Sharing locations with friends on online social networks

ABSTRACT

In one embodiment, a mobile-client system may receive user input from a first user to send a message to a plurality of second users. The user input may include an indication of the first user currently being located at a first geographic location, a time period for which the first geographic location of the first user is visible to the plurality of second users, and one or more content items shared by the first user. The mobile-client system may send the message to one or more second users selected from the plurality of second users. The mobile-client system may receive a notification referencing one or more of the selected second users to whom the message was sent. The notification may include an indication of one or more second geographic locations shared by the one or more of the selected second users.

PRIORITY

This application is a continuation under 35 U.S.C. § 120 of U.S. patentapplication Ser. No. 15/806,273, filed 7 Nov. 2017, which is acontinuation under 35 U.S.C. § 120 of U.S. patent application Ser. No.14/323,923, filed 3 Jul. 2014, which claims the benefit under 35 U.S.C.§ 119(e) of U.S. Provisional Patent Application No. 61/980,453, filed 16Apr. 2014, each of which is incorporated herein by reference.

TECHNICAL FIELD

This disclosure generally relates to mobile devices, social graphs,location services, search, and sending and receiving notificationswithin a social-networking environment.

BACKGROUND

A social-networking system, which may include a social-networkingwebsite, may enable its users (such as persons or organizations) tointeract with it and with each other through it. The social-networkingsystem may, with input from a user, create and store in thesocial-networking system a user profile associated with the user. Theuser profile may include demographic information, communication-channelinformation, and information on personal interests of the user. Thesocial-networking system may also, with input from a user, create andstore a record of relationships of the user with other users of thesocial-networking system, as well as provide services (e.g. wall posts,photo-sharing, event organization, messaging, games, or advertisements)to facilitate social interaction between or among users.

The social-networking system may transmit over one or more networkscontent or messages related to its services to a mobile or othercomputing device of a user. A user may also install softwareapplications on a mobile or other computing device of the user foraccessing a user profile of the user and other data within thesocial-networking system. The social-networking system may generate apersonalized set of content objects to display to a user, such as anewsfeed of aggregated stories of other users connected to the user.

A mobile computing device—such as a smartphone, tablet computer, orlaptop computer—may include functionality for determining its location,direction, or orientation, such as a Global Positioning System (GPS)receiver, compass, or gyroscope. Such a device may also includefunctionality for wireless communication, such as BLUETOOTHcommunication, near-field communication (NFC), or infrared (IR)communication or communication with a wireless local area networks(WLANs) or cellular-telephone network. Such a device may also includeone or more cameras, scanners, touchscreens, microphones, or speakers.Mobile computing devices may also execute software applications, such asgames, web browsers, or social-networking applications. Withsocial-networking applications, users may connect, communicate, andshare information with other users in their social networks.

SUMMARY OF PARTICULAR EMBODIMENTS

In particular embodiments, the social-networking system may pushnotifications to a mobile device of a first user of an online socialnetwork. The social-networking system may determine a first location ofthe first user, and second locations of one or more second users. Thesocial-networking system may determine a threshold distance for eachsecond user with respect to the first user, based at least in part onthe social affinity or social closeness of the second user with respectto the first user. If the second user is within the respective thresholddistance of the first user, the social-networking system may push anotification to the first user referencing the second user and that thesecond user is nearby. The precise location of the second user may besent to the first user.

In particular embodiments, the mobile device of a user may determine aset of conditions that would enable the mobile device to update itslocation to the social-networking system in a battery-saving manner. Thefrequency of location updates sent to the social-networking system maybe determined by a server of the social-networking system, or may bedetermined by the mobile device of the user.

In particular embodiments, the social-networking system may compare thelocation history of a particular user against a fixed location, oragainst the location history of another user, in order to determine ifthe particular user has been in close proximity to the fixed location orthe another user at some time in the past. The social-networking systemmay determine a threshold distance and minimum time requirement, whereinother users or locations within the threshold distance of the particularuser for at least the minimum time is considered to have been in closeproximity. In particular embodiments, the social-networking system maycalculate a proximity coefficient for each instance that the particularuser and the another user or other location, wherein the proximitycoefficient is calculated as a function of the quantified distancebetween the particular user and the another user or location, and thetime elapsed at the quantified distance.

In particular embodiments, the social-networking system may use theproximity coefficient to improve ranking of search results in responseto a query by a user of the social-networking system. Thesocial-networking system may disambiguate between two or more searchresults (for example, two users with the same name, or all photosassociated with a particular user) by comparing the location history ofthe user submitting the search request with at least one locationassociated with the search result. The associated location may be a tag,a check-in, or location metadata, or a location history of another useralso associated with the search result. The social-networking system maydetermine if the searching user has been in close proximity with anylocation associated with a search result, calculate a proximitycoefficient between the searching user and the associated location, andrank the search results based at least in part on the proximitycoefficient.

In particular embodiments, the social-networking system may use aproximity coefficient to improve presentation of content to a user ofthe social-networking system, by promoting content associated with alocation that is relevant to the user. The social-networking system maycompare the location history of the user with any location associatedwith a content item, calculate a proximity coefficient for any contentitems that the user was in close proximity to, and rank the contentitems for presentation to the user based at least in part on theproximity coefficient.

In particular embodiments, the social-networking system may use aproximity coefficient to improve tag suggestions for images shared onthe social-networking system. The social-networking system may receivean image to be shared on the social-networking system, where the imagedepicts at least one person. The social-networking system may perform afacial recognition analysis to identify the person depicted in theimage, and suggest tagging the identified person in the image. Thetag-suggestion may be improved at least in part throughsocial-networking information regarding the candidates determined by thefacial recognition analysis. The tag-suggestion may be further improvedby comparing the location histories of the candidates with a locationassociated with the photograph, a location associated with the sharinguser, or a location associated with another user depicted in thephotograph. The comparison of location histories may be used toeliminate one or more of the candidates, or to improve the score for oneor more candidates to make it more likely that those candidates will besuggested for tagging.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with asocial-networking system.

FIG. 2 illustrates an example social graph.

FIG. 3 illustrates an example mobile-client system.

FIG. 4 illustrates an example method of obtaining background locationupdates.

FIG. 5 illustrates an example method of sending a notification to a userof another nearby user.

FIG. 6 illustrates an example notification referencing a nearby user.

FIG. 7 illustrates an example interface for viewing a user-list ofnearby users grouped by location.

FIG. 8 illustrates an example interface for a user to view the user'sactivity log.

FIG. 9 illustrates an example interface for sharing a user's preciselocation to other users of the social-networking system.

FIG. 10 illustrates an example interface for viewing the preciselocation of another user of the social-networking system.

FIG. 11 illustrates an example flowchart for determining frequency oflocation updates from a mobile client system.

FIG. 12 illustrates an example comparison of two user locationhistories.

FIG. 13 illustrates an example method for calculating a proximitycoefficient between two users based on their location histories.

FIG. 14 illustrates an example method for determining and ranking a setof search results based at least in part on a location historycomparison.

FIG. 15 illustrates an example method for selecting and ranking contentitems to be presented to a user based at least in part on a locationhistory comparison.

FIG. 16 illustrates an example method for conducting facial recognitionwith location history comparison as a factor for comparison.

FIG. 17 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

System Overview

FIG. 1 illustrates an example network environment 100 associated with asocial-networking system. Network environment 100 includes amobile-client system 130, a social-networking system 160, and asearch-engine system 170 connected to each other by a network 110.Although FIG. 1 illustrates a particular arrangement of mobile-clientsystem 130, social-networking system 160, search-engine system 170, andnetwork 110, this disclosure contemplates any suitable arrangement ofmobile-client system 130, social-networking system 160, search-enginesystem 170, and network 110. As an example and not by way of limitation,two or more of mobile-client system 130, social-networking system 160,and search-engine system 170 may be connected to each other directly,bypassing network 110. As another example, two or more of mobile-clientsystem 130, social-networking system 160, and search-engine system 170may be physically or logically co-located with each other in whole or inpart. Moreover, although FIG. 1 illustrates a particular number ofmobile-client systems 130, social-networking systems 160, search-enginesystems 170, and networks 110, this disclosure contemplates any suitablenumber of mobile-client systems 130, social-networking systems 160,search-engine systems 170, and networks 110. As an example and not byway of limitation, network environment 100 may include multiplemobile-client system 130, social-networking systems 160, search-enginesystems 170, and networks 110.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect mobile-client system 130, social-networking system160, and search-engine system 170 to communication network 110 or toeach other. This disclosure contemplates any suitable links 150. Inparticular embodiments, one or more links 150 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOCSIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 150 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 150, or a combination of two or more such links150. Links 150 need not necessarily be the same throughout networkenvironment 100. One or more first links 150 may differ in one or morerespects from one or more second links 150.

In particular embodiments, mobile-client system 130 may be an electronicdevice including hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functionalities implemented or supported bymobile-client system 130. Mobile-client system 130 may be any suitablemobile computing device, such as, for example, a laptop computer, acellular telephone, a smartphone, or a tablet computer. This disclosurecontemplates any suitable mobile-client systems 130. A mobile-clientsystem 130 may enable a network user at mobile-client system 130 toaccess network 110. In particular embodiments, one or more users 101 mayuse one or more mobile-client systems 130 to access, send data to, andreceive data from social-networking system 160 or search-engine system170. Mobile-client system 130 may access social-networking system 160 orsearch-engine system 170 directly, via network 110, or via a third-partysystem. As an example and not by way of limitation, mobile-client system130 may access search-engine system 170 via social-networking system160. A mobile-client system 130 may enable its user to communicate withother users at other client systems.

In particular embodiments, mobile-client system 130 may include a webbrowser, such as, for example, MICROSOFT INTERNET EXPLORER (or INTERNETEXPLORER MOBILE), GOOGLE CHROME, GOOGLE ANDROID, APPLE SAFARI, OPERA (orOPERA MINI or OPERA MOBILE), BITSTREAM BOLT, or MOZILLA FIREFOX (orFIREFOX MOBILE), and may have one or more add-ons, plug-ins, or otherextensions. To request access to a webpage, a user 101 at mobile-clientsystem 130 may enter a Uniform Resource Locator (URL) or other addressdirecting the web browser to a particular server (such as, for example,a server associated with a social-networking system 160, a 3rd-partyapplication server, a web server, an enterprise server, adevice-detection system 170, or another suitable system), and the webbrowser may generate a Hyper Text Transfer Protocol (HTTP) request andcommunicate the HTTP request to server. The request for the webpage mayinclude an http-header comprising one or more header fields that definethe operating parameters of the HTTP transaction. The server may acceptthe HTTP request and communicate to mobile-client system 130 one or moreHyper Text Markup Language (HTML) files responsive to the HTTP request.Mobile-client system 130 may render a webpage based on the HTML filesfrom the server for presentation to the user. This disclosurecontemplates any suitable webpage files. As an example and not by way oflimitation, webpages may render from HTML files, Extensible Hyper TextMarkup Language (XHTML) files, or Extensible Markup Language (XML)files, according to particular needs. Such pages may also executescripts such as, for example and without limitation, those written inJAVASCRIPT, JAVA, MICROSOFT SILVERLIGHT, combinations of markup languageand scripts such as AJAX (Asynchronous JAVASCRIPT and XML), and thelike. Herein, reference to a webpage encompasses one or morecorresponding webpage files (which a browser may use to render thewebpage) and vice versa, where appropriate.

In particular embodiments, social-networking system 160 may be anetwork-addressable computing system that can host an online socialnetwork. Social-networking system 160 may generate, store, receive, andtransmit social-networking data, such as, for example, user-profiledata, concept-profile data, social-graph information, or other suitabledata related to the online social network. Social-networking system 160may be accessed by the other components of network environment 100either directly or via network 110. In particular embodiments,social-networking system 160 may include one or more servers 162. Eachserver 162 may be a unitary server or a distributed server spanningmultiple computers or multiple datacenters. Servers 162 may be ofvarious types, such as, for example and without limitation, web server,news server, mail server, message server, advertising server, fileserver, application server, exchange server, database server, proxyserver, another server suitable for performing functions or processesdescribed herein, or any combination thereof. In particular embodiments,each server 162 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server162. In particular embodiments, social-networking system 160 may includeone or more data stores 164. Data stores 164 may be used to storevarious types of information. In particular embodiments, the informationstored in data stores 164 may be organized according to specific datastructures. In particular embodiments, each data store 164 may be arelational database. Particular embodiments may provide interfaces thatenable a mobile-client system 130, a social-networking system 160, or asearch-engine system 170 to manage, retrieve, modify, add, or delete,the information stored in data store 164.

In particular embodiments, social-networking system 160 may store one ormore social graphs in one or more data stores 164. In particularembodiments, a social graph may include multiple nodes—which may includemultiple user nodes (each corresponding to a particular user) ormultiple concept nodes (each corresponding to a particular concept)—andmultiple edges connecting the nodes. Social-networking system 160 mayprovide users of the online social network the ability to communicateand interact with other users. In particular embodiments, users may jointhe online social network via social-networking system 160 and then addconnections (i.e., relationships) to a number of other users ofsocial-networking system 160 whom they want to be connected to. Herein,the term “friend” may refer to any other user of social-networkingsystem 160 with whom a user has formed a connection, association, orrelationship via social-networking system 160.

In particular embodiments, social-networking system 160 may provideusers with the ability to take actions on various types of items orobjects, supported by social-networking system 160. As an example andnot by way of limitation, the items and objects may include groups orsocial networks to which users of social-networking system 160 maybelong, events or calendar entries in which a user might be interested,computer-based applications that a user may use, transactions that allowusers to buy or sell items via the service, interactions withadvertisements that a user may perform, or other suitable items orobjects. A user may interact with anything that is capable of beingrepresented in social-networking system 160 or by an external system ofsearch-engine system 170, which is separate from social-networkingsystem 160 and coupled to social-networking system 160 via a network110.

In particular embodiments, social-networking system 160 may be capableof linking a variety of entities. As an example and not by way oflimitation, social-networking system 160 may enable users to interactwith each other as well as receive content from search-engine systems170 or other entities, or to allow users to interact with these entitiesthrough an application programming interfaces (API) or othercommunication channels.

In particular embodiments, search-engine system 170 may be anetwork-addressable computing system that can host an online searchengine. Search-engine system 170 may generate, store, receive, and sendsearch-related data, such as, for example, search queries, searchresults, and other suitable search-related data. As an example and notby way of limitation, search-engine system 170 may implement one or moresearch algorithms to identify network resources in response to searchqueries received at search-engine system 170, one or more scoringalgorithms or ranking algorithms to score and/or rank identified networkresources, or one or more summarization algorithms to summarizeidentified network resources. In particular embodiments, a scoringalgorithm implemented by search-engine system 170 may use amachine-learned scoring formula, which the scoring algorithm may obtainautomatically from a set of training data constructed from pairs ofsearch queries and selected Uniform Resource Locators (URLs), whereappropriate. Search-engine system 170 may be accessed by the othercomponents of network environment 100 either directly or via network110.

In particular embodiments, social-networking system 160 also includesuser-generated content objects, which may enhance a user's interactionswith social-networking system 160. User-generated content may includeanything a user can add, upload, send, or “post” to social-networkingsystem 160. As an example and not by way of limitation, a usercommunicates posts to social-networking system 160 from a mobile-clientsystem 130. Posts may include data such as status updates or othertextual data, location information, photos, videos, links, music orother similar data or media. Content may also be added tosocial-networking system 160 by a third-party through a “communicationchannel,” such as a newsfeed or stream.

In particular embodiments, social-networking system 160 may include avariety of servers, sub-systems, programs, modules, logs, and datastores. In particular embodiments, social-networking system 160 mayinclude one or more of the following: a web server, action logger,API-request server, relevance-and-ranking engine, content-objectclassifier, notification controller, action log,third-party-content-object-exposure log, inference module,authorization/privacy server, search module, ad-targeting module,user-interface module, user-profile store, connection store, third-partycontent store, or location store. Social-networking system 160 may alsoinclude suitable components such as network interfaces, securitymechanisms, load balancers, failover servers,management-and-network-operations consoles, other suitable components,or any suitable combination thereof. In particular embodiments,social-networking system 160 may include one or more user-profile storesfor storing user profiles. A user profile may include, for example,biographic information, demographic information, behavioral information,social information, or other types of descriptive information, such aswork experience, educational history, hobbies or preferences, interests,affinities, or location. Interest information may include interestsrelated to one or more categories. Categories may be general orspecific. As an example and not by way of limitation, if a user “likes”an article about a brand of shoes the category may be the brand, or thegeneral category of “shoes” or “clothing.” A connection store may beused for storing connection information about users. The connectioninformation may indicate users who have similar or common workexperience, group memberships, hobbies, educational history, or are inany way related or share common attributes. The connection informationmay also include user-defined connections between different users andcontent (both internal and external). A web server may be used forlinking social-networking system 160 to one or more mobile-clientsystems 130 or one or more search-engine system 170 via network 110. Theweb server may include a mail server or other messaging functionalityfor receiving and routing messages between social-networking system 160and one or more mobile-client systems 130. An API-request server mayallow a search-engine system 170 to access information fromsocial-networking system 160 by calling one or more APIs. An actionlogger may be used to receive communications from a web server about auser's actions on or off social-networking system 160. In conjunctionwith the action log, a third-party-content-object log may be maintainedof user exposures to third-party-content objects. A notificationcontroller may provide information regarding content objects to amobile-client system 130. Information may be pushed to a mobile-clientsystem 130 as notifications, or information may be pulled frommobile-client system 130 responsive to a request received frommobile-client system 130. Authorization servers may be used to enforceone or more privacy settings of the users of social-networking system160. A privacy setting of a user determines how particular informationassociated with a user can be shared. The authorization server may allowusers to opt in or opt out of having their actions logged bysocial-networking system 160 or shared with other systems (e.g.,search-engine system 170), such as, for example, by setting appropriateprivacy settings. Third-party-content-object stores may be used to storecontent objects received from third parties, such as a search-enginesystem 170. Location stores may be used for storing location informationreceived from mobile-client systems 130 associated with users.Ad-pricing modules may combine social information, the current time,location information, or other suitable information to provide relevantadvertisements, in the form of notifications, to a user.

Social Graphs

FIG. 2 illustrates example social graph 200. In particular embodiments,social-networking system 160 may store one or more social graphs 200 inone or more data stores. In particular embodiments, social graph 200 mayinclude multiple nodes—which may include multiple user nodes 202 ormultiple concept nodes 204—and multiple edges 206 connecting the nodes.Example social graph 200 illustrated in FIG. 2 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 160, mobile-client system 130,or search-engine system 170 may access social graph 200 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 200 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 200.

In particular embodiments, a user node 202 may correspond to a user ofsocial-networking system 160. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 160. In particular embodiments, when a userregisters for an account with social-networking system 160,social-networking system 160 may create a user node 202 corresponding tothe user, and store the user node 202 in one or more data stores. Usersand user nodes 202 described herein may, where appropriate, refer toregistered users and user nodes 202 associated with registered users. Inaddition or as an alternative, users and user nodes 202 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 160. In particular embodiments, a user node 202may be associated with information provided by a user or informationgathered by various systems, including social-networking system 160. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 202 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 202 may correspond to one or more webpages.

In particular embodiments, a concept node 204 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 160 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 160 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory;another suitable concept; or two or more such concepts. A concept node204 may be associated with information of a concept provided by a useror information gathered by various systems, including social-networkingsystem 160. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 204 may beassociated with one or more data objects corresponding to informationassociated with concept node 204. In particular embodiments, a conceptnode 204 may correspond to one or more webpages.

In particular embodiments, a node in social graph 200 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 160. Profile pages may also be hosted onthird-party websites associated with a third-party server 170. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 204.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 202 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express himself orherself. As another example and not by way of limitation, a concept node204 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node204.

In particular embodiments, a concept node 204 may represent athird-party webpage or resource hosted by a search-engine system 170.The third-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “eat”), causing a mobile-clientsystem 130 to transmit to social-networking system 160 a messageindicating the user's action. In response to the message,social-networking system 160 may create an edge (e.g., an “eat” edge)between a user node 202 corresponding to the user and a concept node 204corresponding to the third-party webpage or resource and store edge 206in one or more data stores.

In particular embodiments, a pair of nodes in social graph 200 may beconnected to each other by one or more edges 206. An edge 206 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 206 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 160 maytransmit a “friend request” to the second user. If the second userconfirms the “friend request,” social-networking system 160 may createan edge 206 connecting the first user's user node 202 to the seconduser's user node 202 in social graph 200 and store edge 206 associal-graph information in one or more of data stores 24. In theexample of FIG. 2, social graph 200 includes an edge 206 indicating afriend relation between user nodes 202 of user “A” and user “B” and anedge indicating a friend relation between user nodes 202 of user “C” anduser “B.” Although this disclosure describes or illustrates particularedges 206 with particular attributes connecting particular user nodes202, this disclosure contemplates any suitable edges 206 with anysuitable attributes connecting user nodes 202. As an example and not byway of limitation, an edge 206 may represent a friendship, familyrelationship, business or employment relationship, fan relationship,follower relationship, visitor relationship, subscriber relationship,superior/subordinate relationship, reciprocal relationship,non-reciprocal relationship, another suitable type of relationship, ortwo or more such relationships. Moreover, although this disclosuregenerally describes nodes as being connected, this disclosure alsodescribes users or concepts as being connected. Herein, references tousers or concepts being connected may, where appropriate, refer to thenodes corresponding to those users or concepts being connected in socialgraph 200 by one or more edges 206.

In particular embodiments, an edge 206 between a user node 202 and aconcept node 204 may represent a particular action or activity performedby a user associated with user node 202 toward a concept associated witha concept node 204. As an example and not by way of limitation, asillustrated in FIG. 2, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to a edge type or subtype. A concept-profile pagecorresponding to a concept node 204 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 160 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Imagine”) using aparticular application (for example, an online music application). Inthis case, social-networking system 160 may create a “listened” edge 206and a “used” edge (as illustrated in FIG. 2) between user nodes 202corresponding to the user and concept nodes 204 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 160 may createa “played” edge 206 (as illustrated in FIG. 2) between concept nodes 204corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 206 corresponds to an action performed by an externalapplication (for example, an online music application) on an externalaudio file (the song “Imagine”). Although this disclosure describesparticular edges 206 with particular attributes connecting user nodes202 and concept nodes 204, this disclosure contemplates any suitableedges 206 with any suitable attributes connecting user nodes 202 andconcept nodes 204. Moreover, although this disclosure describes edgesbetween a user node 202 and a concept node 204 representing a singlerelationship, this disclosure contemplates edges between a user node 202and a concept node 204 representing one or more relationships. As anexample and not by way of limitation, an edge 206 may represent boththat a user likes and has used at a particular concept. Alternatively,another edge 206 may represent each type of relationship (or multiplesof a single relationship) between a user node 202 and a concept node 204(as illustrated in FIG. 2 between user node 202 for user “E” and conceptnode 204).

In particular embodiments, social-networking system 160 may create anedge 206 between a user node 202 and a concept node 204 in social graph200. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's mobile-client system130) may indicate that he or she likes the concept represented by theconcept node 204 by clicking or selecting a “Like” icon, which may causethe user's mobile-client system 130 to transmit to social-networkingsystem 160 a message indicating the user's liking of the conceptassociated with the concept-profile page. In response to the message,social-networking system 160 may create an edge 206 between user node202 associated with the user and concept node 204, as illustrated by“like” edge 206 between the user and concept node 204. In particularembodiments, social-networking system 160 may store an edge 206 in oneor more data stores. In particular embodiments, an edge 206 may beautomatically formed by social-networking system 160 in response to aparticular user action. As an example and not by way of limitation, if afirst user uploads a picture, watches a movie, or listens to a song, anedge 206 may be formed between user node 202 corresponding to the firstuser and concept nodes 204 corresponding to those concepts. Althoughthis disclosure describes forming particular edges 206 in particularmanners, this disclosure contemplates forming any suitable edges 206 inany suitable manner.

Location Information

In particular embodiments, the social-networking system 160 maydetermine a geographic location (hereinafter also simply “location”) ofan object (e.g., a user, a concept, or a mobile-client system 130associated with a user or concept). The location of an object may beidentified and stored as a street address (e.g., “1601 Willow Road”), aset of geographic coordinates (latitude and longitude), a reference toanother location or object (e.g., “the coffee shop next to the trainstation”), a reference to a map tile (e.g., “map tile 32”), or usinganother suitable identifier. In particular embodiments, the location ofan object may be provided by a user of an online social network. As anexample and not by way of limitation, a user may input his location bychecking-in at the location or otherwise providing an indication of hislocation. As another example and not by way of limitation, a user mayinput the location of a concept (e.g., a place or venue) by accessingthe profile page for the concept and entering the location information(e.g., the stress address) of the concept. In particular embodiment, thelocation of a mobile-client system 130 equipped with cellular, Wi-Fi,GPS, or other suitable capabilities may be identified withgeographic-positioning signals. As an example and not by way oflimitation, a mobile-client system 130 may include one or more sensorsthat may facilitate geo-location functionalities of the system.Processing of sensor inputs by the mobile-client system 130 with one ormore sensor devices (for example, processing a GPS sensor signal anddisplaying in the device's graphical user interface a map of a locationcorresponding to the GPS sensor signal) may be implemented by acombination of hardware, software, and/or firmware (or device drivers).Geographic-positioning signals may be obtained by cell towertriangulation, Wi-Fi positioning, or GPS positioning. In particularembodiments, a geographic location of an Internet-connected computer canbe identified by the computer's IP address. A mobile-client system 130may also have additional functionalities incorporatinggeographic-location data of the device, such as, for example, providingdriving directions, displaying a map of a current location, or providinginformation of nearby points of interest such as restaurants, gasstations, etc. As an example and not by way of limitation, a web browserapplication on the mobile-client system 130 may access a mapping library(e.g., via a function call) that generates a map containing a GPSlocation obtained by a device driver interpreting a GPS signal from aGPS sensor, and display the map in the web browser application'sgraphical user interface. In particular embodiments, the location of auser may be determined from a search history associated with the user.As an example and not by way of limitation, if a particular user haspreviously queried for objects in a particular location, thesocial-networking system 160 (or the search-engine system 170) mayassume that the user is still at that particular location. Although thisdisclosure describes determining the location of an object in aparticular manner, this disclosure contemplates determining the locationof an object in any suitable manner.

In particular embodiments, the social-networking system 160 may maintaina database of information relating to locations. The social-networkingsystem 160 may also maintain meta information about particularlocations, such as, for example, photos of the location, advertisements,user reviews, comments, “check-in” activity data, “like” activity data,hours of operation, or other suitable information related to thelocation. In particular embodiments, a location may correspond to aconcept node 204 in a social graph 200 (such as, for example, asdescribed previously or as described in U.S. patent application Ser. No.12/763,171, which is incorporated by reference herein). Thesocial-networking system 160 may allow users to access informationregarding a location using a client application (e.g., a web browser orother suitable application) hosted by a mobile-client system 130. As anexample and not by way of limitation, social-networking system 160 mayserve webpages (or other structured documents) to users that requestinformation about a location. In addition to user profile and locationinformation, the system may track or maintain other information aboutthe user. As an example and not by way of limitation, thesocial-networking system 160 may support geo-social-networkingfunctionality including one or more location-based services that recordthe user's location. As an example and not by way of limitation, usersmay access the geo-social-networking system using a special-purposeclient application hosted by a mobile-client system 130 of the user (ora web- or network-based application using a browser client). The clientapplication may automatically access GPS or other geo-location functionssupported by the mobile-client system 130 and report the user's currentlocation to the geo-social-networking system. In addition, the clientapplication may support geo-social networking functionality that allowsusers to “check-in” at various locations and communicate this locationto other users. A check-in to a given location may occur when a user isphysically located at a location and, using a mobile-client system 130,access the geo-social-networking system to register the user's presenceat the location. The social-networking system 160 may automaticallycheck-in a user to a location based on the user's current location andpast location data (such as, for example, as described in U.S. patentapplication Ser. No. 13/042,357, which is incorporated by referenceherein). In particular embodiments, the social-networking system 160 mayallow users to indicate other types of relationships with respect toparticular locations, such as “like,” “fan,” “worked at,” “recommended,”“attended,” or another suitable type of relationship. In particularembodiments, “check-in” information and other relationship informationmay be represented in the social graph 200 as an edge 206 connecting theuser node 202 of the user to the concept node 204 of the location.

Mobile Clients

FIG. 3 illustrates an example mobile client system 130. This disclosurecontemplates mobile client system 130 taking any suitable physical form.In particular embodiments, mobile client system 130 may be a computingsystem as described below. As example and not by way of limitation,mobile client system 130 may be a single-board computer system (SBC)(such as, for example, a computer-on-module (COM) or system-on-module(SOM)), a laptop or notebook computer system, a mobile telephone, asmartphone, a personal digital assistant (PDA), a tablet computersystem, or a combination of two or more of these. In particularembodiments, mobile client system 130 may have a touch sensor 132 as aninput component. In the example of FIG. 3, touch sensor 132 isincorporated on a front surface of mobile client system 130. In the caseof capacitive touch sensors, there may be two types of electrodes:transmitting and receiving. These electrodes may be connected to acontroller designed to drive the transmitting electrodes with electricalpulses and measure the changes in capacitance from the receivingelectrodes caused by a touch or proximity input. In the example of FIG.3, one or more antennae 134A-B may be incorporated into one or moresides of mobile client system 130. Antennae 134A-B are components thatconvert electric current into radio waves, and vice versa. Duringtransmission of signals, a transmitter applies an oscillating radiofrequency (RF) electric current to terminals of antenna 134A-B, andantenna 134A-B radiates the energy of the applied the current aselectromagnetic (EM) waves. During reception of signals, antennae 134A-Bconvert the power of an incoming EM wave into a voltage at the terminalsof antennae 134A-B. The voltage may be transmitted to a receiver foramplification.

In particular embodiments, mobile client system 130 many include acommunication component coupled to antennae 134A-B for communicatingwith an Ethernet or other wire-based network or a wireless NIC (WNIC),wireless adapter for communicating with a wireless network, such as forexample a WI-FI network or modem for communicating with a cellularnetwork, such third generation mobile telecommunications (3G), or LongTerm Evolution (LTE) network. This disclosure contemplates any suitablenetwork and any suitable communication component 20 for it. As anexample and not by way of limitation, mobile client system 130 maycommunicate with an ad hoc network, a personal area network (PAN), alocal area network (LAN), a wide area network (WAN), a metropolitan areanetwork (MAN), or one or more portions of the Internet or a combinationof two or more of these. One or more portions of one or more of thesenetworks may be wired or wireless. As another example, mobile clientsystem 130 may communicate with a wireless PAN (WPAN) (such as, forexample, a BLUETOOTH WPAN), a WI-FI network, a WI-MAX network, acellular telephone network (such as, for example, a Global System forMobile Communications (GSM), 3G, or LTE network), or other suitablewireless network or a combination of two or more of these. Mobile clientsystem 130 may include any suitable communication component for any ofthese networks, where appropriate.

In particular embodiments, the communication component coupled toantennae 134A-B mobile client system 130 may be configured to determinelocation data based on global positioning system (GPS) signals, cellulartriangulation, wireless hotspots, or any suitable methods fordetermining location data. In particular embodiments, the locationservice of mobile client system 130 may use one or more methods oflocation determination, such as for example, using the location of oneor more cellular towers, crowd-sourced location information associatedwith a WI-FI hotspot, or a GPS function of mobile client system 130. Asan example and not by way of limitation, the application may use GPSdata as the primary source of location information depending at least inpart on whether mobile client system 130 is able to acquire GPS datawithin a pre-determined period of time. As another example, if mobileclient system 130 is unable to acquire the GPS data within thepre-determined sampling duration, the application may use the locationdetermined using one or more cellular towers or WI-FI hotspots. Althoughthis disclosure describes a location service using particular methods oflocation determination, this disclosure contemplates a location serviceusing any suitable method or combination of methods of locationdetection.

Background Location Updates

In particular embodiments, social-networking system 160 may be able toautomatically and without any manual input from the user, track thelocation of mobile client system 130. Social-networking system 160 maypoll or “ping” the mobile client system 130 at pre-determined intervalsto obtain location information through an application of mobile clientsystem 130 running in a background mode. In response to the ping, theapplication of mobile client system 130 may activate a location serviceof mobile client system 130. Social-networking system 160 may adjust thepolling frequency or sampling duration based on various factors.

FIG. 4 illustrates an example method for ambient location tracking. Themethod may start at Step 410, where an activation signal is transmittedby a server at a pre-determined polling frequency that wakes anapplication on a mobile device from a sleep mode and causing theapplication to activate the location service of the mobile device for apre-determined sampling duration. In particular embodiments, thepre-determined polling frequency and the pre-determined samplingduration are determined at least in part by a travel distance of themobile device. In other particular embodiments, the pre-determinedsampling duration may be adjusted depending at least in part on whetherthe mobile device is stationary or in motion. At Step 420, the serverreceives location data from the mobile device after the pre-determinedsampling duration, at which point the method may end. The location datais responsive to the transmission signal. In particular embodiments,Steps 410-420 are recursively repeated. Although this disclosuredescribes and illustrates particular steps of the method of FIG. 4 asoccurring in a particular order, this disclosure contemplates anysuitable steps of the method of FIG. 4 occurring in any suitable order.Moreover, although this disclosure describes and illustrates particularcomponents carrying out particular steps of the method of FIG. 4, thisdisclosure contemplates any suitable combination of any suitablecomponents carrying out any suitable steps of the method of FIG. 4.Background location updates are further described in U.S. PatentApplication Publication No. 2013/0331119, filed 6 Feb. 2013, which isincorporated by reference herein.

Nearby Friends

In particular embodiments, social-networking system 160 may determinethe locations of a first user and one or more second users, where theuser node 202 of social graph 200 associated with the first user isconnected to the user nodes 202 associated with the second users.Social-networking system 160 may then determine if the first user wouldbe interested in being notified of the location of the one or moresecond users. A user of an online social network may wish to be notifiedwhen another user is nearby, which would facilitate meeting up inperson, hanging out together, etc. These notifications may be pushed toa user's mobile client system 130 if various notification rules aresatisfied. The user may also access a list of nearby users, for exampleby accessing the online social network and reviewing a page referencingone or more nearby users (e.g., on a user-card referencing “FriendsNearby”). The criteria for determining whether to send notifications andreferencing on a page may be different. In particular embodiments,determination of whether the first user would be interested may be basedat least in part on the geographical proximity of the second users tothe first user. Social-networking system 160 may determine that if thefirst user is notified of one or more second users who are near thefirst user, the first user may desire to contact the one or more secondusers and meet up in person. In particular embodiments,social-networking system 160 may send notifications to a first user inorder to encourage the first user to meet up with the one or more secondusers.

In particular embodiments, social-networking system 160 may determinethe distance between the detected location of the first user and thedetected locations of one or more second users. This distance may be astraight-line (absolute) distance, a travel distance (e.g. walking ordriving distance), another suitable distance, or any combinationthereof. In particular embodiments, social-networking system 160 maydetermine a place associated with the location of the first user, andone or more places associated with the locations of the one or moresecond users. As an example and not by way of limitation,social-networking system 160 may determine that the first user and asecond user are in the same place of business, building, landmark, orneighborhood. As another example, social-networking system 160 maydetermine that the first user and a second user are in adjacent orproximate places of business, buildings, landmarks, or neighborhoods.

In particular embodiments, social-networking system 160 may calculate adistance to determine if the second user may be classified as “nearby”with respect to the first user. If the second user is within a thresholddistance of the first user, social-networking system 160 may classifythe second user as “nearby.” In particular embodiments, the thresholddistance for determining whether a second user is “nearby” may be basedon a variety of factors. As an example and not by way of limitation, thethreshold distance may be higher for a second user who is travelling farfrom his place of residence, compared to a second user whose currentlocation is close to their place of residence. For example, if the firstuser is currently in Menlo Park, Calif., then the threshold distance fora second user residing in San Jose, Calif. may be ½ mile, while thethreshold distance for a second user residing in New York, N.Y. may be 2miles, wherein the threshold distance is larger for the second user fromNew York because that user is currently farther from his residence. Asanother example, if the first user and second user are both residents ofthe same city, the threshold distance may be reduced further. Inparticular embodiments, the threshold distance may scale with thedistance between residences of the first user and the second user. Inparticular embodiments, social-networking system 160 may determine aminimum distance between residences of the first user and the seconduser for setting an increased threshold distance. As an example and notby way of limitation, the threshold distance may be increased to 2 milesfrom a default threshold distance of ½ mile if the second user residesmore than 150 miles away from the first user.

In particular embodiments, the threshold distance may be adjusted basedon a social affinity or closeness of the second user with respect to thefirst user on social graph 200. Two second users who are first-degreeconnections to the first user (i.e., the users correspond to user nodes202 that are connected by a single edge 206 to the user node 202corresponding to the first user in social graph 200) may have differentsocial affinities or closeness based on interactions between the users(which may be interaction both on and off the online social network). Inparticular embodiments, second users who have a greater social affinityor are closer to the first user on the social graph may have anincreased threshold distance. This may allow the first user to benotified if a close friend is anywhere near their current location. Asan example and not by way of limitation, social-networking system 160may determine that a first user may wish to know if a friend is ½ mileaway, but may also want to know if a close friend is 1 mile away. Thefirst user may subsequently be willing to travel 1 mile to meet up withthe close friend, whereas the first user may not be willing to travelmore than ½ mile for a “lesser” friend. In particular embodiments, ifthe affinity of a second user with respect to the first user is below athreshold affinity, social-networking system 160 may determine that nonotification should be sent, even if the physical geographical locationsare very close.

In particular embodiments, the threshold distance for closer secondusers may be decreased from a default threshold distance. As an exampleand not by way of limitation, social-networking system 160 may determinethat the second user having the greatest affinity with respect to thefirst user may also be the first user's closest friend out of the socialnetwork as well. In this example, the first user may interact with thesecond user on a regular basis, such that if the second user is within ½mile, it is not “newsworthy” to the first user. Instead,social-networking system may determine that the second user would haveto be in the same building, or on the same city block as the first userbefore determining that the second user is “nearby.”

In particular embodiments, two or more second users may be travelingtogether in the same region as a first user. Social-networking system160 may determine a different threshold distance for the combination oftwo or more second users than it may determine for each second userconsidered individually. As an example and not by way of limitation,Alice may be at Umami Burger in downtown Palo Alto, Calif.Social-networking system 160 may have determined that Alice's friendsBob and Carol each have a threshold distance of ½ mile. Bob and Carolmay then arrive together at Stanford Shopping Center, which is about onemile from Umami Burger. Although social-networking system 160 would notsend a notification to Alice that either Bob or Carol were nearby inthis situation, social-networking system 160 may determine that thethreshold distance for Bob and Carol with respect to Alice is one mile.Social-networking system 160 may then send a notification to Alice thatboth Bob and Carol are nearby, allowing Alice the opportunity to meet upwith both Bob and Carol. In particular embodiments, the adjustedthreshold distance may be calculated by social-networking system 160using the social affinities or closeness of both Bob and Carol withrespect to Alice. In particular embodiments, the social affinities orcloseness of the plurality of second users may be weighted with respectto each other to calculate a combined threshold distance. As anotherexample using the scenario described above, Bob and Carol may havearrived at Stanford Shopping Center separately. No notification would besent to Alice for either Bob or Carol, whose individual thresholddistance is below the current distance between Alice and Bob or Aliceand Carol. Instead, Bob may receive a notification that Carol is nearby,and subsequently contact Carol to meet with her. Once social-networkingsystem 160 determines that Bob and Carol have met up in person atStanford Shopping Center, the threshold distance for both Bob and Carolwith respect to Alice will be increased. If Bob and Carol are within onemile of Alice, a notification will then be sent to Alice.

FIG. 5 illustrates an example method of determining whether any friendsare nearby with respect to a particular user of social-networking system160. At step 510, a current location of the particular user isdetermined. At step 520, based on the current location of the particularuser, a threshold distance may be determined. As discussed above, thethreshold distance may vary for example if the particular user istraveling far from his or her home location. At step 530,social-networking system 160 may determine one or more another userswhose locations are also known to social-networking system 160.Social-networking system 160 may limit the another users to users ofsocial-networking system 160 who are within a threshold degree ofseparation from the particular user. At step 540, social-networkingsystem 160 may determine whether there is at least one another userwithin the threshold distance from the current location. If there is noanother user, the process may end. If there is another user within thethreshold distance, then at step 550, social-networking system 160 maydetermine if the notification rules are satisfied for the particularanother user and the particular user. If the notification rules aresatisfied, then at step 560, a notification referencing the another useris sent to the particular user.

Particular embodiments may repeat one or more steps of the method ofFIG. 5, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 5 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 5 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.5, this disclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 5.

Social-networking system 160 may send a push notification tomobile-client system 130 of a first user informing him that a particularsecond user is nearby. The notification may be, for example, a SMSmessage, a MMS message, an email message, a banner notification, apop-up notification, an in-app notification (e.g., a jewelnotification), a cloud-to-device notification (e.g., C2DM notification),another suitable type of notification, or any combination thereof. Inparticular embodiments, the notification may be a push notification.Push technology may be used in a variety of circumstances. For example,in a client-server environment, a server may push communications to aclient. A notification may be sent (pushed) from the server to theclient through a push channel. The client may be any type of electronicdevice capable of network communications. In particular embodiments, theclient may be a mobile device (e.g., a mobile telephone, a smart phone,a tablet computer, etc.) capable of wireless communications, and theserver may push communications, sent over a mobile network or a wirelessnetwork, to the mobile device. As an example and not by way oflimitation, the social-networking system 160 may initiate acommunication transaction with a user's mobile-client system 130 andsend the notification to the mobile-client system 130 without obtaininga permission from the receiving system first. In other words, thenotification may be “pushed” to the receiving device whether or not thereceiving device (or the user of the device) actually wants to receivethe communication. Although this disclosure describes sending particularnotifications in a particular manner, this disclosure contemplatessending any suitable notifications in any suitable manner.

FIG. 6 depicts an example notification sent to a mobile client system130 of a first user informing the first user that a particular user isnearby. In particular embodiments, the first user may be able to accessa notifications page 610 of social-networking system 160 which listsprevious notifications sent to the first user. The notifications page610 may display older notifications 625 that another user is nearby thefirst user. The notification 625 may include an indication of the age ofthe notification. In particular embodiments, the notification 625 mayinclude an interactive element 635. If the first user interacts withinteractive element 635, social-networking system 160 may provide thefirst user with a precise location of the particular second userassociated with notification 625, if the particular second user hasshared her precise location with the first user. In particularembodiments, when a new notification is sent to the first user, thenotification may be displayed on mobile client system 130 of the firstuser as a pop-up notification 620, referencing a particular second user.The pop-up notification may also include an interactive element 630operable to allow the first user to view a precise location of theparticular second user.

In particular embodiments, a first user may send a request tosocial-networking system 160 to view a list of one or more second users,where the second users comprising the list are selected based on theirlocation. The request may be sent through an application on mobileclient system 130, or through a webpage of the social-networking systemaccessed by a browser on mobile client system 130. Social-networkingsystem 160 may send a user-list to mobile client system 130 of the firstuser for display, where the user-list comprises one or more user-cardswhich each comprise at least one second user. User-cards anddetermination of selecting users to comprise each user-card arediscussed in further detail in U.S. patent application Ser. No.14/231,049, filed 31 Mar. 2014, and U.S. patent application Ser. No.14/231,201, filed 31 Mar. 2014, which are incorporated by reference.

FIG. 7 depicts an example user-list display to a first user displayingone or more second users who are nearby. In the example of FIG. 7, afirst user who is currently in the Mission District in San Francisco,Calif. may select an element displayed in an application of the socialnetwork on their mobile device entitled “Nearby Friends.” In particularembodiments, the first user may access the element through a webbrowser. In response to selection of the element, the application maydisplay a user-list 700 of one or more second users. The second usersmay be grouped into clusters 710, 720 based on their current location.In the example of FIG. 7, the first cluster 710 of second users refersto second users who are “Nearby.” Determination of whether a second usercan be placed in the “Nearby” cluster may be based on whether the seconduser is within their threshold distance with respect to the first user.In particular embodiments, a different threshold distance may be used todetermine if a second user is in the “Nearby” cluster than the thresholddistance used to determine if a notification should be sent. The currentlocation of each second user may be displayed adjacent to each displayedsecond user. In particular embodiments, the displayed current locationmay comprise a neighborhood, a landmark, a building, or a placeassociated with the current location of the particular second user. Inparticular embodiments, the displayed current location may comprise anestimated geographic distance separating the first user and theparticular second user. In particular embodiments, the estimatedgeographic distance may be based on the determined accuracy of thedetected current locations of the first user and the particular seconduser. In particular embodiments, the estimated geographic distance maybe rounded off to the next unit of distance. As an example and not byway of limitation, all second users who are between ¼ mile and ½ miledistant from the first user may be displayed as being ½ mile away.

In particular embodiments, a cluster 710, 720 of second users maycontain more second users than can be easily viewed on the display of amobile device. The user-list 700 may then display only a subset ofsecond user for each cluster, and display an interactive element 750that the first user can select to view more second users in the cluster.In the example of FIG. 7, three second users have been listed in the“Nearby” cluster 710. Below the third displayed second user, theuser-list displays a “See More” element 750. In particular embodiments,selecting “See More” element 750 may expand the display of cluster 710within user-list 700. In particular embodiments, selecting “See More”element 750 may cause the application or web browser to display a newinterface which presents more second users for display. The newinterface may be a new webpage, a new pop-up window, or a newuser-interface within an application on the mobile client device.

In particular embodiments, user-list 700 of second users may be orderedbased on the distance of each second user to the first user. As anexample and not by way of limitation, user-list 700 may rank the secondusers by their distance from the first user, and user-list 700 may bepresented to the first user with the physically closest second userlisted first, the next closest second user listed second, and continuein the same manner. In particular embodiments, the locations of thesecond users may be associated with a particular region or city. Thesecond users may then be clustered according to their associated city.User-list 700 may then rank the clusters 710, 720 of second users basedon the distance of each associated city from the first user. Inparticular embodiments, in the case of two cities being equally distantfrom the first user, the city cluster containing more second users maybe ranked higher than the other cluster. In the example of FIG. 7, theapplication displays first displays the “Nearby” cluster 710 of secondusers as discussed above. Below that cluster is a cluster 720 entitled“In San Francisco, Calif.” This cluster 720 may contain second userswhose current locations correspond to the city limits of San Francisco,Calif. In particular embodiments, a second user may be placed in boththe “Nearby” cluster and the “San Francisco” cluster. In particularembodiments, the clusters 710, 720 may be ranked for presentation. Inparticular embodiments, social-networking system 160 may determine thehighest-ranked cluster for a second user, then exclude that second userfrom being listed in any other cluster. In particular embodiments, theclusters may be ranked based at least in part on the affinity of thesecond users comprising each cluster with respect to the first user. Asan example and not by way of limitation, a city cluster associated witha city ten miles away and comprising three second users who have a highsocial affinity with respect to the first user may be ranked ahead of acity cluster associated with a city only five miles away but comprisingsecond users who have a much lower affinity with respect to the firstuser.

Notification Rules

In particular embodiments, once social-networking system 160 hasdetermined that a second user is “nearby” with respect to a first user,social-networking system 160 may then use a set of notification rules todetermine if a notification should be sent to the first user informingthem that the second user is nearby. As an example and not by way oflimitation, social-networking system 160 may only send notifications toa first user if social-networking system 160 decides that the first userwould want to know that the particular second user is nearby, and wouldlikely meet up with the particular second user after being notified. Inthis example, the first user would not be sent notifications that theydo not care as much about, nor would they receive notifications ofsecond users at a time and place where they would not subsequently meetup with the second user.

In particular embodiments, one notification rule used bysocial-networking system 160 may be to determine whether the currentlocation of a particular second user corresponds to a determined“hotspot” for that second user. As an example and not by way oflimitation, a second user's hotspots may be her residence, her school,and her place of work. If the second user is in a hotspot,social-networking system 160 may decide to not send a notification to afirst user. In the above example, if the second user is at home, atschool, or at work, this may not be a “newsworthy” event to share toother users. In particular embodiments, social-networking system 160 mayonly send notifications when the second user is in a relatively unusuallocation, such that the second user's new location would be of interestto a first user. As another example, a first user may be a co-worker ofa second user. If the second user arrives at work in the morning, thefirst user would not be interested in being notified of such anevent—the first user would expect the second user to be nearby.Conversely, if after work the second user goes to a place that she doesnot ordinarily go to, and it is within the threshold distance for theparticular second user with respect to the particular first user, thefirst user may be interested to know that her co-worker is nearby atthat time and location, and may then contact the second user to meet inperson.

In particular embodiments, one notification rule may be determiningwhether the current location of the first user corresponds to adetermined hotspot for the first user. The hotspots corresponding to thefirst user may not overlap with the hotspots of other users. As anexample and not by way of limitation, social-networking system 160 maydetermine that a notification should not be sent to the first user whenthe first user is at home, at work, or at another hotspot. If the firstuser is at home or work, he may not wish to leave his current locationto meet a second user, or may be unable to leave his current location atthat time. Therefore, social-networking system 160 may preventnotifications from being sent to a first user while he is at a hotspot.

In particular embodiments, one notification rule may be determining thatboth the first user and the second user are stationary. This may preventthe sending of “drive-by” notifications, where at least one of the usersare passing by the other user and temporarily become “nearby” the other.As an example and not by way of limitation, the second user may be at anunusual location, and have a predetermined threshold of ½ mile withrespect to a first user. The first user, driving from her workplace toher home, may pass within ½ mile of the second user during her commute.Although the second user is then “nearby” the first user,social-networking system 160 may determine that the first user would notbe interested in being notified of this occurrence. The first user maybe intent on getting to her destination and uninterested in meeting upwith the second user, or may not see the notification until she isoutside the threshold distance. In particular embodiments,social-networking system 160 may not send a notification until itdetermines that both the first user and the second user have beenstationary at their respective current locations for a period of time.As an example and not by way of limitation, if the first user is at afirst location, and a second user subsequently arrives at a secondlocation within the threshold distance for that particular second userwith respect to the first user, social-networking system 160 may waituntil the second user has been at the second location for five minutesbefore sending a notification to the first user.

In particular embodiments, the social closeness of the second user withrespect to the first user may be used to determine a notification rule.The closeness may be based on the first user's past interactions withthe second user both on and off the social-networking system. As anexample and not by way of limitation, a second user may be in the sameplace of business as a first user. The threshold distance for theparticular second user may be such that the second user is determined tobe “nearby” with respect to the first user. However, social-networkingsystem 160 may determine that the first user ordinarily does not meetwith this particular second user in person. The first user may haveindicated to social-networking system 160 that this particular seconduser is only an “acquaintance” and not a “friend.” In either of theabove situations, social-networking system 160 may determine thatalthough the particular second user is nearby, no notification should besent. In particular embodiments, a threshold social closeness oraffinity may be required to send a notification. This social closenessor affinity may be based on real-world interactions between the firstuser and the second user. As an example and not by way of limitation, afirst user Alice may be at a first location, with second users Bob andCarol nearby the first location. Both Bob and Carol may have a highsocial affinity with respect to Alice, but Bob may have interacted withAlice more in person, while Carol's high affinity with respect to Aliceis a result of frequent communications between Alice and Carol throughsocial-networking system 160. Social-networking system 160 may determinethat although both Bob and Carol are close friends of Alice, Alice wouldbe more interested in being notified that Bob is nearby and subsequentlymeeting up with him in person, while Alice may not be as likely to meetup with Carol in person even if Alice is notified that Carol is nearby.In this example, social-networking system 160 may only send anotification to Alice that Bob is nearby, and not send any notificationsregarding Carol.

In particular embodiments, social-networking system 160 may use anotification rule that if a notification has been sent within a previousperiod of time for the same second user with respect to the first user,then a new notification will not be sent. As an example and not by wayof limitation, if a notification has been sent within the last 24 hoursfor a particular second user, then if that same second user is againnearby the first user, a new notification will not be sent.Social-networking system 160 may determine that the first user will beless interested in the notification if another notification was sentrecently. In particular embodiments, if a notification was sent recentlybut the first user was unable to subsequently meet up with the seconduser, social-networking system 160 may determine that the secondnotification should be sent, giving the first user another opportunityto meet up with the second user.

In particular embodiments, one notification rule may be that the firstuser and the nearby second user not have been recently together.Social-networking system 160 may use location histories of the firstuser and the second user to determine if they were recently at the samelocation, or if there were any interactions between the first user andsecond user that were recorded by social-networking system 160 andindicate that the first user and second user have recently met. As anexample and not by way of limitation, interactions between the firstuser and second user may include being recently tagged in the samecontent posted on the social network, having attended the same event, orbeing checked in at the same location at the same time.Social-networking system 160 may determine a threshold time period forthe second user with respect to the first user, where an indication of arecent meeting within the time period will result in a notification notbeing sent. In particular embodiments, the threshold time period may bebased on affinity of the second user for the first user on thesocial-networking system, a history of interactions between the firstuser and the second user, or the frequency of other in-person meetingsfor the first user or the second user. In particular embodiments, adifferent threshold time period may be used if the first user or seconduser is traveling (e.g. more than 150 miles from home), or if the firstuser and second user are traveling together (e.g. both users are morethan 150 miles from home, and their location histories have been verysimilar over a period of time).

In particular embodiments, one notification rule may be to not send anotification to the first user if social-networking system 160determines that the first user already knows that the second user isnearby. As an example and not by way of limitation, social-networkingsystem 160 may consider if the first user and second user are travelingtogether, and thus would likely know where the other user is. As anotherexample, social-networking system 160 may be aware of previousinteractions between the first user and the second user, such as textmessages, voice calls, e-mail, posts or comments on social-networkingsystem 160, or other means of communication that is detectable bysocial-networking system 160. A recent increase in communication betweenthe first user and the second user may indicate that their currentproximity to each other was deliberate, and that they are aware thatthey are near each other.

In particular embodiments, one notification rule may be to not send anotification if a recent location history for the first user or thesecond user is not available. As an example and not by way oflimitation, social-networking system 160 may be aware that the firstuser is at Dolores Park in San Francisco, Calif. Social-networkingsystem 160 may have a location history of the first user that indicatesthat the first user arrived at Dolores Park one hour ago from his home,and has been in Dolores Park continuously for the past hour. Conversely,social-networking system 160 may detect a second user also in DoloresPark, but without any location history information for the past hour.Without knowing where the second user has been, social-networking system160 may not be able to determine if the second user is just travelingthrough Dolores Park and has no intention of staying, is stoppedmomentarily, or if the current location is even accurate. Without someindication of the second user's past locations leading up to the currentlocation, social-networking system 160 may determine that sending anotification to the first user is not likely to result in the first userand second user meeting up in person. If that determination is made, anotification will not be sent. In particular embodiments,social-networking system 160 may determine a threshold time period forlocation history, where if either the first user or second user does nothave a consistent location history for the previous time period,social-networking system 160 will not send a notification.

In particular embodiments, if any of the notification rules are not met,social-networking system 160 may decide not to send the notification. Inparticular embodiments, the notification rules comprising the set ofnotification rules may be weighted, with a weighted score beingassociated with each notification rule. Social-networking system 160 mayrequire a threshold score to be exceeded in order to send thenotification to be sent to the first user. In particular embodiments,social-networking system 160 may use a weak AND (WAND) or strong OR(SOR) functionality to determine if a notification should be sent evenif one or more notification rules are not met. In particularembodiments, when the second user comes within the threshold distance ofthe first user, social-networking system 160 may make one check of theset of notification rules. If the notification rules are not met and thenotification rules are not sent, social-networking system may not checkthe set of notification rules again. In particular embodiments,social-networking system 160 may periodically update the set ofnotification rules for the first and second users to determine if anotification should be sent at that time. Social-networking system 160may also re-check the set of notification rules in response to receivinga location update for the first or second user. Although this disclosuredescribes notification rules using particular methods of determiningwhether a notification should be sent, this disclosure contemplates aset of notification rules using any suitable method or combination ofmethods of determining whether a user would be interested in thenotification and subsequently act based on the notification.

Activity Logs

Social-networking system 160 may contain a database containing alocation history associated with a user. The database may contain aseparate location history for each user. The location history maycomprise one or more location updates, wherein each location updaterepresents each instance of the mobile client system 130 of the usersending its location to social-networking system 160. The locationhistory may contain the user's location determined through othersources. As an example and not by way of limitation, the locationhistory may contain location and time entries derived from the userchecking in at a particular location at a particular time, even if themobile client system 130 of the user did not report its location at thattime. Other examples of providing time and location information mayinclude being the user being tagged in a photograph that containsmetadata pertaining to the time and location where it was shot. The usermay be tagged at a later time than when the photo and associatedmetadata was uploaded to social-networking system 160, and the locationhistory would update the new location based on the tag in the propertime slot. In particular embodiments, social-networking system 160 mayweight location updates determined through background location servicesequally with location updates provided through check-in activities ortags of the user. In particular embodiments, social-networking system160 may weight the check-in activities or tags of the user greater thanbackground location updates. As an example and not by way of limitation,if the location update for a particular user indicates that the user isat the Caltrain Station at 4th St. and King St. in San Francisco,Calif., but the user checks in at AT&T Park two blocks away from theCaltrain Station, social-networking system 160 may determine that thebackground location update is in error, override the background locationupdate and determine that the user's location at that time is actuallyAT&T Park.

In particular embodiments, social-networking system 160 may store thelocation history as a set of location updates, wherein each locationupdate comprises geographic coordinates and a time stamp associated withthe geographic coordinates. In particular embodiments, the time stampassociated with a location update may be a time range between the timeof the location update and the time of the subsequent update. As anexample and not by way of limitation, if a user sends a first locationupdate at 8:00 AM from a first location, and then sends a locationupdate at 8:15 AM from a second location, social-networking system 160may record the first user as being at the first location from 8:00 AM to8:15 AM. In particular embodiments, if the user has been stationary formultiple location updates, then social-networking system 160 may combinemultiple location updates into a single location update for the timerange that the user was stationary. As an example and not by way oflimitation, if the user continues to send location updates every 15minutes from the second location from 8:15 AM to 8:00 PM,social-networking system 160 may consolidate the multiple entries to onelocation updates from the second location with a time stamp of 8:15AM-8:00 PM.

In particular embodiments, social-networking system 160 may record eachlocation by their geographic coordinates. In particular embodiments,social-networking system 160 may determine one or more places associatedwith one or more of the geographic coordinates. As an example and not byway of limitation, for a set of location updates in a location historyof a user, social-networking system 160 may determine three sets ofgeographic coordinates. Social-networking system 160 may additionallydetermine that the first set of coordinates corresponds to the StanfordShopping Center in Palo Alto, Calif., based on place mapping informationknown to social-networking system 160. For the second set ofcoordinates, social-networking system 160 may determine that the user isat AT&T Park in San Francisco, Calif., based on the user being tagged ina photo also tagged with AT&T Park at the same time. For the third setof coordinates, social-networking system 160 may determine that the useris at San Francisco International Airport, based on the user checking-inat the airport.

In particular embodiments, social-networking system 160 may store boththe geographic coordinates and associated places for each locationupdate in the location history of the user. In particular embodiments,if a user wishes to view their location history throughsocial-networking system 160, social-networking system 160 may providethe user with the places the user was at, rather than the geographiccoordinates.

In particular embodiments, the location history of a particular user maybe used to determine if the recent location history of the user is knownto social-networking system 160. As discussed above, if the recentlocation history is not known, a notification rule may determine thatthe user would not receive notifications, nor would that user's locationbe sent to other users as notifications.

FIG. 8 depicts an example interface for a user of social-networkingsystem 160 to view an activity log. In particular embodiments, the usermay wish to see the location history for that user as stored bysocial-networking system 160. Social-networking system 160 may displayan activity log of that particular user. In particular embodiments, theactivity log may be organized by time period, with the first section 810containing the user's locations within the most recent time period. Asan example and not by way of limitation, the activity log may be brokendown into days, weeks, two weeks, months, or years. Each time period maycontain a map where the user's locations within that time period aremarked. In particular embodiments, a user may interact with a timeperiod 820 to see their activities in more detail. For example, if auser clicks on a time period segment showing their activities for thepast week, the interface may change to display the user's activities forthe past week broken down for each day. In particular embodiments, theuser may interact with the markers on the map 830. The map may thendisplay the time at which the user was detected at the particularmarker.

In particular embodiments, the user may delete one or more of thelocation history entries in their activity log. Deleting a location andtime from the activity log will also delete that entry from the databasein social-networking system 160. In particular embodiments, the user maybe presented with the option to clear their location history for aparticular time or for their entire activity log. In particularembodiments, the user may have the option to disable the locationhistory feature. This would mean that social-networking system 160 maynot store a location of the user beyond their current location. Inparticular embodiments, disabling the location history and activity logmay disable the nearby friends notification feature. As an example andnot by way of limitation, if recent location history is a notificationrule that must be met to receive or send location notifications, thendisabling the activity log would mean that social-networking system 160may not store the location history for that user. Since the recentlocation history of the user would not be known, the notification ruleis not met, and notifications will not be sent or received.

Sharing Precise Location Notifications

In particular embodiments, a user of social-networking system 160 may beat a particular location, and wish to invite other users to meet him atthat location. Rather than deciding on her own which other users toinvite, the user may actively choose to send a notification to a groupof one or more other users, where the other users will only view thenotification if social-networking system 160 determines that they areclose enough to meet up easily in person.

In particular embodiments, a second user of social-networking system 160may actively notify one or more first users of their precise currentlocation. As an example and not by way of limitation, a second user maybe at an unusual location and may wish to share that fact with firstusers so that the first users might come and join the second user. Inparticular embodiments, the second user may choose to send anotification to all of the selected first users, regardless of thecurrent locations of the first users. In particular embodiments,social-networking system 160 may determine if a particular selectedfirst user is within the threshold distance for the second user withrespect to the particular selected first user. If the particularselected first user is within the threshold distance, then anotification may be sent. If the particular selected first user is notwithin the threshold distance, social-networking system 160 maydetermine that a notification should not be sent at the current time.However, if the first user or the second user subsequently moves so thattheir separation is less than their threshold distance, and thenotification has not expired, then the notification may be sent at thattime. In particular embodiments, a second user may request sending anotification of her location even if she is current in a hotspot.Social-networking system 160 may ignore the notification rule regardingthe second user's hotspot in this instance and send the notificationdespite not meeting the particular notification rule.

In particular embodiments, the second user may select a time period forwhich their precise location will be made visible to the selected firstusers. As an example and not by way of limitation, a second user maydetermine that they will be at their current location for the next threehours, and subsequently choose to share their precise location for thenext three hours. In particular embodiments, if a selected first user atany time during those three hours wishes to see the precise location ofthe second user, they may select an option on their mobile client system130 which will display the precise location of the second user which isthe most recently known location of the second user. In particularembodiments, the second user may append content to the locationnotification.

In particular embodiments, the second user may append a content to thenotification. As an example and not by way of limitation, the contentcould be a text message, a status update, a post, a photo, a video, anaudio recording, or any other type of content that may be sent throughsocial-networking system 160.

In particular embodiments, the second user may send his precise locationby selecting an interactive element in an application interface or webbrowser referencing the social-networking system 160. As an example andnot by way of limitation, the second user may be using a messengerapplication to send messages between the second user and a plurality offirst users. The second user may select a button in the messagingapplication that would send a message to the first users informing themof the precise location of the second user. In particular embodiments,the precise location may be sent as an image depicting a map to thefirst users. In particular embodiments, the precise location may be sentthrough another interactive element in the messenger application. If thefirst users subsequently select the interactive element, they may viewthe second user's precise location on a map interface of an applicationor a webpage referencing social-networking system 160.

FIG. 9 illustrates an example interface for a second user to share hisor her location to other users of social-networking system 160. A seconduser may access a location-sharing interface 910 on his mobile clientsystem 130 to share his precise location. Location-sharing interface 910may include a setting 920 for the second user to specify a time periodto share his precise location to one or more other users ofsocial-networking system 160. In the example of FIG. 9, location-sharinginterface 910 may also comprise an interactive element 930 for thesecond user to add content to the sharing of his precise location, forexample a text to be sent to the recipients of the second user's preciselocation. In particular embodiments (but not shown in the example ofFIG. 9), the second user may specify one or more users who areauthorized to access the second user's precise location for the timeperiod specified by setting 920.

Receiving Location Notifications

In particular embodiments, a receiving user may receive a notificationfrom social-networking system 160 on his mobile client system 130informing him that a sending user is nearby. The receiving user may theninteract with the notification further to determine if the sendinguser's precise location is known, or at least a location of the sendinguser. The receiving user may also see a list of all of his friends whohave allowed the receiving user to view their locations. The friends maybe grouped by proximity for the nearest friends; other groups mayinclude all the friends in a particular city, where the cities may bedisplayed in rank order by current distance from the user.

In particular embodiments, a first user receiving a notification of aparticular second user may indicate that they are not interested in theparticular notification. As an example and not by way of limitation, thefirst user may not be interested in being notified about the particularsecond user, or being notified at the particular time or day, or beingnotified at the particular location where the first user was when thenotification was received. In particular embodiments, the first user mayx-out the notification or entry on the user-list. In particularembodiments, social-networking system 160 may record the user's inputand adjust the notification rules in accordance with the user input. Asan example and not by way of limitation, if the first user indicates sheis not interested in being notified about a particular second user,social-networking system 160 may decrease the threshold distance forthat particular second user, or make that particular second usercompletely ineligible for notification to the first user. FIG. 10illustrates an example interface for viewing the precise location ofanother user on social-networking system 160. In particular embodiments,a first user receiving a notification 1030 of a particular nearby seconduser may have been authorized to view that second user's preciselocation. The first user may then interact with notification 1030 toview a map 1010 of the current location 1020 of the second user. Inparticular embodiments, map view 1010 may additionally comprise thecurrent location of the first user 1025. In particular embodiments, themap view may also include a time stamp 1035 for the location of thesecond user indicating the time of the last location update. Inparticular embodiments, the first user may select an interactive element1040 to send a message back to the second user from the map view 1010.As an example and not by way of limitation, the first user may send amessage to the second user “On my way!” In particular embodiments, thefirst user may select an interactive element 1050 within thenotification 1030 of the particular second user to inform the seconduser that the first user is nearby. As an example and not by way oflimitation, the first user may select a button 1050 on the notification1030 that would allow the first user to share his precise location withthe second user. The second user would then be authorized to view thefirst user's precise location, and go to where the first user is. Inparticular embodiments, the first user would be able to share hisprecise location even if the initial notification did not contain theprecise location of the second user.

Power Management

In particular embodiments, mobile client system 130 may be continuouslyreporting its precise location to social-networking system 160. Inparticular embodiments, mobile client system 130 may maintain acontinuous network connection to social-networking system 160 to providelocation updates. This may create a significant drain on the powersupply of mobile client system 130. In particular embodiments, mobileclient system 130 may establish a new connection to social-networkingsystem 160 to send a location update, then close the connection once thelocation update has been sent. Connecting and disconnecting to thesocial-networking system frequently may also create a significant powerdrain for mobile client system 130.

In particular embodiments, mobile client system 130 may use differentmethods of determining its current location based on whether the mobileclient system 130 determines if it is moving or stationary. Inparticular embodiments, mobile client system 130 may be equipped withone or more accelerometers or gyroscopes which may allow mobile clientsystem 130 to detect its orientation and movement. As an example and notby way of limitation, mobile client system 130 may determine that it isstationary or moving very slowly, e.g. at a walking pace. Mobile clientsystem 130 may then rely on methods for determining location that do notconsumer as much electricity, such as Wi-Fi positioning or cell towertriangulation. Conversely, if mobile client system 130 determines thatit is moving at a relatively high speed, e.g. highway driving speeds,then methods like Wi-Fi positioning or cell tower triangulation may notbe as accurate. In that case, mobile client system 130 may use GPSpositioning to more accurately determine its location, at the cost ofadditional power.

In particular embodiments, mobile client system 130 of a user ofsocial-networking system 160 may send its current location tosocial-networking system 160 each time mobile client system 130determines its current location. In particular embodiments, the mobileclient system 130 for users of social-networking system 160 may compriseone or more criteria for determining sending its location tosocial-networking system 160. As an example and not by way oflimitation, mobile client system 130 may send its location tosocial-networking system 160 every fifteen minutes, even though mobileclient system 130 is determining its location every minute. Reducing thefrequency of sending location updates to social-networking system 160may reduce the total bandwidth used by mobile client system 130. Thereduced frequency of location updates may also conserve battery life ofmobile client system 130.

In particular embodiments, the user of the mobile device may have optedto share her current location to other users. The current location maybe sent as a notification to the other users, within another applicationreferencing the social-networking system, or through a user interface ofsocial-networking system 160. If another user requests to view thecurrent location of the sharing user, social-networking system 160 maylook at the age of the last location update from the sharing user. Ifthe last update was recent, social-networking system 160 may send thelast updated location to the other user. If the last updated location istoo old, the request by the other user may cause the location server toping the mobile device of the sharing user, to obtain a more currentlocation.

In particular embodiments, mobile client system 130 may not establish aconnection to social-networking system 160 solely for the purpose ofsending a location update, and send location updates through existingconnections to social-networking system 160. As an example and not byway of limitation, a user may have their mobile device set to check itslocation every minute. However, the mobile device will never open a newconnection to the social network to report its location. If the usersubsequently connects the device to the social network for anotherpurpose, e.g. to send a message on social-networking system 160, themobile device may use the same connection to send the location updatesto social-networking system 160.

In particular embodiments, determination of when location updates shouldbe sent to social-networking system 160 may be executed by a locationserver of social-networking system 160. As an example and not by way oflimitation, when the location server determines that a location updatefor a particular user should be made, the location server may initiate aconnection with the mobile client system 130 of that particular user.The location server may consider the last time when the mobile clientsystem 130 sent a location update to determine if a new location updateshould be requested. In particular embodiments, social-networking system160 may determine that a location update is needed based on the actionsof other users of social-networking system 160. As an example and not byway of limitation, a second user may have shared his precise location toa first user for one hour. Social-networking system 160 may then notrequest a location update for the next 30 minutes. If, after 30 minutes,the first user requests to view the current precise location of thesecond user, social-networking system 160 may then request a locationupdate for the second user at the time the request is made. Inparticular embodiments, the determination of sending location updatesmay be executed by mobile client system 130 of the user. Mobile clientsystem 130 may take into consideration the status of the mobile clientsystem 130 to determine if the location update should be sent. As anexample and not by way of limitation, mobile client system 130 may notsend a location update if the system has not moved since the lastlocation update sent to the location server. Once mobile client system130 detects that it is moving, it may send the location update. Asanother example, mobile client system 130 may consider if the user hasconnected to the social-networking system 160 recently for otherpurposes. If the user has actively established a connection tosocial-networking system 160, mobile client system 130 may decide that alocation update should be sent using the existing connection. Inparticular embodiments, if mobile client system 130 determines that itis moving very rapidly, e.g. at highway speeds, it may determine that alocation update should not be sent at that time. Since the user ofmobile client system 130 is likely in transit at such a high speed, animmediate update of the user's location may not be necessary—nonotifications will be sent to that user, nor will notifications be sentreferencing that user, since the user is moving. Instead, mobile clientsystem 130 may collect location updates until it determines that theuser has reached his destination or otherwise is stopped, and then sendall the location updates that it detected while moving tosocial-networking system 160.

Other features of optimized power usage for location services for amobile client system may include:

-   -   Focusing on the approximate location for updates instead of the        precise location;    -   Focusing on the real-time location more than a perfectly        accurate location history;    -   The location server may use a variety of network/location        conditions based on the operating system of the mobile client        system and the hardware capabilities of the mobile client        system;    -   The location server may have the ability to change the location        update conditions for all users or a group of users after a        period of time from the location server;    -   The location server may control location updates by sending a        profile of constants to the mobile client system;    -   The location update conditions may not use the        accelerometer/gyroscope where the location update requests are        made by the location server;    -   The location server may consider factors for power usage of        sending the location updates to the location server, including        theoretical lab-based power usage number for each message sent,        the cost of wakeup of the mobile client system, aligning with        MQTT keepalives, and quickly detecting when the mobile client        system stops moving at a high speed (delay dist=0 while moving).

The location server may use various optimizations based on the operatingsystem of the mobile client system. As an example and not by way oflimitation, a mobile device operating iOS may be optimized through TCPNagle and Significant Location Change API. As another example, a mobiledevice operating Android may be optimized through pass locations andRadioPowerManager to optimize delayed network activity. The locationserver may compile actual data quality and power usage informationprovided by mobile client systems. In particular embodiments, mobileclient system 130 may send a location update to the location server ofsocial-networking system 160 wherein the location update comprises anindication of the power used by mobile client system 130 to send thelocation update. As an example and not by way of limitation, mobileclient system 130 may indicate the power consumed by mobile clientsystem 130 for determining the location update based on the methods andparameters used for the location update, the power consumed by mobileclient system 130 in establishing any network connections tosocial-networking system 160 (if a new connection was required), or thepower consumed by mobile client system 130 in sending the locationupdate to social-networking system 160. In particular embodiments,either social-networking system 160 or mobile client system 130 mayadjust the methods or parameters for determining and sending locationupdates based at least in part on the power usage reported by mobileclient system 130. As an example and not by way of limitation,social-networking system 160 may instruct mobile client system 130 toreduce the sampling duration when mobile client system 130 is moving athighway speeds upon determining that the increase in power efficiency byreducing the sampling duration outweighs any detectable loss in locationaccuracy under those circumstances. As another example and not by way oflimitation, mobile client system 130 may determine that when its batteryis low and the user is not moving at high speed, it may turn off GPSlocation services and rely on other methods of determining location forbackground location services, where the loss in location accuracy ismore than offset by the reduced power drain relative to the currentpower state of the battery.

FIG. 11 illustrates an example method of determining location frequencyupdates from a mobile client system to the social-networking system. Themethod may begin at step 1110, wherein a mobile client system 130determines its location. As discussed above, mobile client system 130may determine its location using any suitable method. At step 1120,mobile client system 130 may store the location determine in step 1110in a location history stored in mobile client system 130. At step 1130,mobile client system 130 may determine if mobile client system 130 isstationary. As discussed above, mobile client system 130 may definestationary as any speed no faster than walking pace. As an example andnot by way of limitation, if mobile client system 130 detects that it ismoving at 1 mile per hour and has not moved more than 100 yards from aninitial location in the last 10 minutes, mobile client system 130 maydetermine that it is stationary for the purposes of this step. If mobileclient system 130 is stationary, mobile client system 130 may refrainfrom sending a location history to a location server ofsocial-networking system 160. The mobile client system 130 may then waituntil a new location is determined for mobile client system 130. Inparticular embodiments, the time at which a new location is determinedfor mobile client system 130 may be determined by mobile client system130, or may be determined by the location server. However, if mobileclient system 130 detects that it is not stationary, e.g. moving fasterthan a walking pace, then at step 1140, mobile client system 130 maysend the location history stored in mobile client system 130 to alocation server of the online social network.

Particular embodiments may repeat one or more steps of the method ofFIG. 11, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 11 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 11 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.11, this disclosure contemplates any suitable combination of anysuitable components, devices, or systems carrying out any suitable stepsof the method of FIG. 11.

Push notifications, intent, and location-based applications are furtherdescribed in U.S. patent application Ser. No. 13/096,184, filed 28 Apr.2011, U.S. patent application Ser. No. 13/096,197, filed 28 Apr. 2011,U.S. patent application Ser. No. 13/096,208, filed 28 Apr. 2011, U.S.patent application Ser. No. 13/490,394, filed 6 Jun. 2012, U.S. patentapplication Ser. No. 13/656,531, filed 19 Oct. 2012, U.S. patentapplication Ser. No. 13/681,843, filed 20 Nov. 2012, U.S. patentapplication Ser. No. 13/681,947, filed 20 Nov. 2012, and U.S. patentapplication Ser. No. 13/718,273, filed 18 Dec. 2012, each of which isincorporated by reference herein.

Comparison of Location History

In particular embodiments, social-networking system 160 may compare thelocation history associated with a particular user with the locationhistory of another user of social-networking system 160, or a particularlocation. As an example and not by way of limitation, social-networkingsystem 160 may compare the location history associate with a particularuser with a particular location to determine if the user has been nearthe particular location (thereby inferring that the two users met inperson or otherwise encountered each other), and if so, for how long. Asanother example, social-networking system 160 may compare the locationhistories of two users to determine if the two users were near eachother at any point in time, which may indicate that the two users met inperson at the particular point in time.

In particular embodiments, social-networking system 160 may have apredetermined threshold distance and time requirement for determining ifthe user has encountered or otherwise come near another user. If twousers are determined to be within the threshold distance for at leastthe required time, social-networking system 160 may determine that thetwo users were in “close proximity.” As an example and not by way oflimitation, social-networking system 160 may compare the locationhistories of two users, Alice and Bob. Alice may have a location historywhere she is at location A from 1:00 PM to 1:30 PM, location B from 1:30PM to 3:00 PM, and location C from 3:00 PM to 4:00 PM. Bob may have alocation history during that same time period, where he is at location Dfrom 1:00 PM to 2:00 PM, location B from 2:00 PM to 3:30 PM, andlocation E from 3:30 PM to 4:00 PM. If locations A-E are each separatedby a distance of more than 500 yards, and social-networking system 160has set a threshold distance of 100 yards for determining “closeproximity,” social-networking system 160 may determine that Alice andBob were in close proximity from 2:00 PM to 3:00 PM, when both Alice andBob were at location B.

In particular embodiments, social-networking system 160 may initiate thedetermination of whether two users were in close proximity by selectinga first user of social-networking system 160. As an example and not byway of limitation, social-networking system 160 may select a first userin response to a request from the first user to view a number of secondusers. Social-networking system 160 may rank the second users requestedby the first user in order of whether any second users were recently inclose proximity to the first user. In this example, social-networkingsystem 160 may first determine the one or more second users that thefirst user has requested to view, then compare the first user's locationhistory against the location history of each second user to determinewhich second users were in close proximity to the first user. Inparticular embodiments, social-networking system 160 may only look at auser's location history for a predetermined time period to comparelocation history. As an example and not by way of limitation,social-networking system 160 may only use user location histories in theprior month.

In particular embodiments, social-networking system 160 may calculate aproximity coefficient as a quantified measure of the close proximitybetween two users. As an example and not by way of limitation, aproximity coefficient may be calculated by the function f(d,t) where dis the distance between the two users, and t is the total time that thetwo users were at distance d. In particular embodiments,social-networking system 160 may calculate a proximity coefficient onlywhen the two users are within the threshold distance. In particularembodiments, a larger proximity coefficient may represent either agreater amount of time spent near each other, or a smaller physicaldistance separation between the two users. In particular embodiments,social-networking system 160 may calculate a proximity coefficient as acombination of multiple subparts. As an example and not by way oflimitation, users Alice and Bob may be 50 yards apart for 10 minutes;then move to within 10 yards of each other for 30 minutes; then 20 yardsapart for 15 minutes; then move outside the threshold distance.Social-networking system 160 may then calculate a total proximitycoefficient for the encounter between Alice and Bob asf(50,10)+f(10,30)+f(20,15). Social-networking system 160 may use anysuitable method of combining the proximity coefficients for the subpartsof the encounter. In particular embodiments, social-networking system160 may segment the total time the two users were within the thresholddistance into time segments which correspond to the minimum timerequired to determine that the two users are in close proximity. As anexample and not by way of limitation, in the example above, if thethreshold distance is 100 yards and the minimum time required is 5minutes, social-networking system 160 may divide the encounter betweenAlice and Bob into 5-minute segments. In particular embodiments,social-networking system 160 may decay a calculated proximitycoefficient over time, so that an older encounter between two users hasa smaller proximity coefficient compared to a newer encounter.

In particular embodiments, social-networking system 160 may determine asingle proximity coefficient for one user with respect to a second user,wherein the proximity coefficient comprises subpart proximitycoefficients calculated for each encounter between the users. As anexample and not by way of limitation, users Alice and Bob may have beenin close proximity on Day 1, and a proximity coefficient may have beengenerated based on this encounter. The proximity coefficient may beupdated daily through a decay function so that the proximity coefficientdecreases as time passed. If Alice and Bob meet again on Day 5, a totalproximity coefficient may be determined for Alice and Bob, comprisingthe proximity coefficient calculated for this new encounter on Day 5,and the proximity coefficient calculated for the encounter on Day 1,decayed by four days. In particular embodiments, social-networkingsystem 160 may update the proximity coefficient for two usersautomatically, or in response to an indication that the two users haverecently been in close proximity. As an example and not by way oflimitation, in the example given above, social-networking system 160 maynot make a new proximity coefficient on Day 5 after the new encounter,but may wait until either Alice or Bob makes a request tosocial-networking system 160 which would require an updated proximitycoefficient to be calculated.

FIG. 12 illustrates an example comparison of location history in a mapview 1200 for two users. In the example of FIG. 12, a first user'slocation history may comprise geographic locations 1210A-E, and a seconduser's location history may comprise geographic locations 1220A-C. Foreach geographic location comprising a user's location history,social-networking system 160 may associate a time stamp comprising thetime during which a user was at the particular geographic location. Inan example embodiment of FIG. 12, the first user may have been atlocation 1210A from 1:00 PM to 2:00 PM, at location 1210B from 2:00 PMto 3:30 PM, at location 1210C from 3:30 PM to 4:00 PM, at location 1210Dfrom 4:00 PM to 5:00 PM, and location 1210E from 5:00 PM to 7:00 PM. Onthe same day, the second user may have been at location 1220A from 12:30PM to 4:30 PM, at location 1220B from 4:30 PM to 6:00 PM, and atlocation 1220C from 6:00 PM to 7:00 PM. Social-networking system 160 maydetermine that locations 1210D and 1220B are within a threshold distanceof each other for the first user and the second user, and that locations1210E and 1220A are also within a threshold distance of each other.However, because the first user was not at location 1210E at any pointin time when the second user was at location 1220A, social-networkingsystem 160 may disregard this location for the first user and the seconduser since they were not actually in close proximity there.Social-networking system 160 may calculate a proximity coefficient forthe close proximity encounter between the first user and the second userat locations 1210D and 1220B. The proximity coefficient may berepresented as f(d,t) where d is the distance between 1210D and 1220B,and t is the shared time for the first user and second user at theirrespective locations, i.e. 4:30 PM to 5:00 PM or 30 minutes.

In particular embodiments, if the first user or the second user istraveling, social-networking system 160 may adjust the determination ofclose proximity to include locations 1210E and 1220A. In this situation,social-networking system 160 may calculate a proximity coefficient forthe close proximity encounter between 1210E and 1220A. Because the twogeographic locations do not share any time at those respectivelocations, social-networking system 160 may use the time elapsed foreach user at their given location, such that the proximity coefficientmay be represented as f(d,t) where d is the distance between 1210E and1220A, and t is a combination of the time stamp for 1210E (5:00 PM-7:00PM) and the time stamp for 1220A (3:30 PM-4:30 PM).

In particular embodiments, the threshold distance for the first user andsecond user in the example of FIG. 12 may be quite large, so that alllocations of the first user 1210A-E are within the threshold distancewhen compared to all locations of the second user 1220A-C.Social-networking system 160 may calculate a single proximitycoefficient for the first user and the second user based on thelocations and times of the first user's and second user's movements. Inthe example discussed above, the proximity coefficient would then berepresented as f((d₁,t₁), (d₂,t₂) . . . (d_(i),t_(i))), wherein d_(i) isthe distance between the first user and the second user during timet_(i). For example, d₁ is the distance between 1210A and 1220A, and t₁is the time during which the first user and second user were at thoserespective locations (1:00 PM-2:00 PM), d₂ is the distance between 1210Band 1220A, and t₂ is 2:00 PM to 3:30 PM, and so on. The last d_(i),t_(i)determined in this example would be the distance between 1210E and1220C, for the time period 6:00 PM to 7:00 PM.

FIG. 13 illustrates an example method for calculating proximitycoefficient for a user with respect to another location. At step 1310,social-networking system 160 may access the location history of a user.At step 1320, based on one or more geographic locations comprising thelocation history, a threshold distance may be determined. Based on thethreshold distance, at step 1330 social-networking system 160 may checkwhether any of the geographic locations of the location history iswithin the threshold distance of another location, and if the anotherlocation comprises a location history of another user, whether there isan overlap in time, such that the two users were in close proximity at agiven point in time. If there is at least one instance of closeproximity where the location histories overlap in time, at step 1340social-networking system 160 may determine whether the overlap in timeexceeds a required time period. In particular embodiments,social-networking system 160 may determine for comparison with a fixedlocation whether the user was within the threshold distance of the fixedlocation for at least the required amount of time. As an example and notby way of limitation, social-networking system 160 may require that thetwo users be in close proximity to each other for at least 10 minutes.If there is an overlap in the location histories for at least therequired time period, then at step 1350, social-networking system 160may calculate a proximity coefficient for the user with respect to acontent, user or entity associated with the another location, whereinthe proximity coefficient may be represented as f(d, t) where d is thedistance between a geographic location of the location history and theanother location, and t is the time during which the user was at thegeographic location within a threshold distance of the another location.

Particular embodiments may repeat one or more steps of the method ofFIG. 13, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 13 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 13 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.13, this disclosure contemplates any suitable combination of anysuitable components, devices, or systems carrying out any suitable stepsof the method of FIG. 13.

In particular embodiments, social-networking system 160 may alsocalculate a proximity coefficient for a user's location history withrespect to a fixed location. As an example and not by way of limitation,social-networking system 160 may determine if the user has been near aplace, a particular address, or a location associated with contentshared on social-networking system 160.

In particular embodiments, social-networking system 160 may adjust thedefinition of “close proximity” or calculation of proximity coefficientbased on a context of the location history for one or more users. As anexample and not by way of limitation, social-networking system 160 maydetermine that a particular user is traveling, based on the distance ofher current location from her home. In particular embodiments,social-networking system 160 may determine that a particular user istraveling once the particular user is detected in another state,country, region, or other geographical area from her homestate/country/region.

In particular embodiments, if a user is traveling, social-networkingsystem 160 may determine that the user may be interested in finding outmore about other users who have travelled to roughly the same location,even if they are not within the default threshold distance from theuser, or have not traveled there at the same time. Social-networkingsystem 160 may determine that the particular user and the other usersmay have a common interest in having visited the same place. As anexample and not by way of limitation, user Alice may live in SanFrancisco, Calif., and visit Paris, France for one week.Social-networking system 160 may adjust its parameters in determiningother users in close proximity to Alice while she was in Paris, or mayadjust the calculation of proximity coefficient for other users in closeproximity while Alice was in Paris. User Bob, who lives in San Jose,Calif., may visit Paris a week after Alice. Social-networking system 160may adjust both the distance requirements and the time requirementsnecessary to determine that Alice and Bob were in close proximity, andmake the determination that Alice and Bob were in close proximity withrespect to being in Paris even though they were not there at the sametime. As another example, user Carol may visit Paris at the same time asAlice, where Carol's location history does not cross Alice's path (e.g.Carol and Alice are never within ½ mile of each other while they are inParis). Social-networking system 160 may increase the threshold distancefor Alice and Carol to 1 mile, and calculate a proximity coefficient forany instance where Alice and Carol were within 1 mile.

In particular embodiments, a proximity coefficient calculated for twousers may be used as a signal in determining the social affinity of oneof the users with respect to the other on social graph 200 ofsocial-networking system 160. In particular embodiments,social-networking system 160 may update the calculated proximitycoefficient when the social affinity is being updated. In particularembodiments, the proximity coefficient may be stored separately from thesocial affinity for two users.

People Search

In particular embodiments, social-networking system 160 may use thelocation history comparison and a proximity coefficient to determine oneor more search results to be presented to a user. The location historycomparison and proximity coefficient may be used to disambiguate similarsearch results, or to rank them for presentation to the user. As anexample and not by way of limitation, location history comparison andproximity coefficient may be used to disambiguate suggestions in atypeahead context, queries in a graph search context, or to generate andrank a set of search results. For a first user of social-networkingsystem 160, social-networking system 160 may determine that the firstuser may be more interested in second users having a similar locationhistory compared to the first user (indicating that they may sharecommon interests, go to the same type of places, etc.) or moreinterested in locations near places that the user already frequents(e.g. a dry cleaners near the user's workplace, a picture taken at theuser's favorite restaurant, etc.).

In particular embodiments, a first user of social-networking system 160may submit a query to social-networking system 160 wherein the queryrelates to one or more second users of social-networking system 160.social-networking system 160 may generate a set of one or more secondusers responsive to the query, and rank them for presentation based onfactors such as common tagged content, mutual friends onsocial-networking system 160, common likes, or any other suitable meansfor determining an affinity between the first user and the particularsecond user. In particular embodiments, social-networking system 160 maycompare the location histories of the first user and a particular seconduser, determine a proximity coefficient for the first user and thesecond user, and rank the second users based on their respectiveproximity coefficients. In particular embodiments, the proximitycoefficient may be used as a signal in calculating a social affinity ofone user with respect to another user. Since the social affinity may beused to rank a set of search results, the proximity coefficient may beused indirectly in ranking the set of search results, and it may beunnecessary to further disambiguate the search results directly by theirrespective proximity coefficients.

As an example and not by way of limitation, user Alice may submit asearch query on social-networking system 160 for a user named “JohnDoe.” Social-networking system 160 may generate a set of search resultsresponsive to this query, wherein the set of search results comprisesfive users named John Doe: John Doe 1, John Doe 2, John Doe 3, John Doe4, and John Doe 5. Social-networking system 160 may then rank the fiveJohn Does for presentation to Alice. The ranking may first consider thesocial affinity of any of the John Does with respect to Alice. In thisexample, John Doe 1 may be a friend of Alice on social-networking system160, while the other John Does are friends of friends. Therefore,social-networking system 160 may rank John Doe 1 first. For theremaining John Does, social-networking system 160 may not be able todistinguish any differences between the four users. Social-networkingsystem 160 may then use location history comparisons, by comparingAlice's location history with the location histories of each John Doe todetermine if there were any encounters between Alice and the particularJohn Doe, and calculate a proximity coefficient. Based on the locationhistory comparison, social-networking system 160 may determine thatAlice was at the same location as John Doe 2 for two hours last month,and that Alice was within 20 yards of John Doe 3 for 30 minutes theprevious day, while there was no encounter between Alice and John Does 4and 5. Social-networking system 160 may therefore rank John Does 2 and 3over John Does 4 and 5 based on the location history comparison. Infurther ranking between John Doe 2 and John Doe 3, social-networkingsystem 160 may calculate the proximity coefficient for each user withrespect to Alice. If the proximity coefficient for John Doe 2 hasdecayed due to the encounter being one month old, social-networkingsystem 160 may determine that the proximity coefficient for John Doe 3is higher, and therefore rank John Doe 3 ahead of John Doe 2. Inparticular embodiments, social-networking system 160 may also update orgenerate a proximity coefficient for all users matching the searchrequest. As an example and not by way of limitation, social-networkingsystem 160 may also update or generate the proximity coefficient forAlice with respect to John Doe 1, even though it was not required torank John Doe 1.

In particular embodiments, social-networking system 160 may use aproximity coefficient to generate and rank a set of search resultsassociated with a single location. As an example and not by way oflimitation, the search results may comprise an entity node associatedwith a place of business having a fixed location, or may comprisecontent having an associated location, such as an image shared onsocial-networking system 160 with a tagged location of where the imagewas taken. In particular embodiments, social-networking system 160 mayuse the proximity coefficient to disambiguate search results that areotherwise similar in social affinity to the searching user. As anexample and not by way of limitation, user Alice may submit a searchquery for “The Starlight Restaurant.” The SN may determine that thereare three restaurants with that name in the US, but the user does nothave any activity on social-networking system 160 relating to any of therestaurants, such as check-ins or tags associated with the restaurants.Social-networking system 160 may be able to rank the three restaurantsbased on physical proximity to Alice at the time she submitted thesearch, but if all three restaurants are very far away,social-networking system 160 may not be able to determine solely basedon distance which should be ranked first. Social-networking system 160may use a location history comparison to determine that Alice was at alocation within 50 yards of a particular Starlight Restaurant three daysago, and that Alice has never been near the other two locations.Social-networking system 160 may then present the Starlight Restaurantthat Alice has been near first in the set of search results.

As another example and not by way of limitation, Alice may submit asearch query for “photos of Bob,” which may return search resultscomprising images shared on social-networking system 160 that have beentagged with Bob. Social-networking system 160 may rank the photos of Bobby a location history comparison of Alice with each picture of Bob. Inthis example, if there are four pictures of Bob (pictures A1, B1, C1,D1) each having an associated location where the picture was taken(locations A2, B2, C2, D2), social-networking system 160 may determineif Alice's location history indicates that she has been to any oflocations A2-D2. If Alice's location history shows that she has neverbeen to location A2, was at location B2 for five minutes this morning,was at location C2 for a morning two weeks prior, and was at location D2two days ago for the entire day, then social-networking system 160 mayrank the four images in the following order based on the proximitycoefficient calculated for Alice with respect to each image: D1, B1, C1,A1.

In particular embodiments, social-networking system 160 mayautomatically update the proximity coefficient for a particular userwith respect to other users who reside in the same region as theparticular user. As an example and not by way of limitation,social-networking system 160 may access the particular user's locationhistory every hour, every 12 hours, or every day, etc., determine foreach location update whether there were any other users in closeproximity to the particular user, and generate or update proximitycoefficients for the particular user with respect to each of the otherusers. As another example, if the particular user resides in Portland,Oreg., social-networking system 160 may directly compare the particularuser's location history with the location histories of all other usersresiding in Portland to determine if there were any encounters betweenthe particular user and an other user.

In particular embodiments, social-networking system 160 may only updateproximity coefficient when there is a need to update the proximitycoefficient. If the proximity coefficient is used as a signal indetermining social affinity, then social-networking system 160 mayupdate a first user's proximity coefficient with respect to a seconduser when social-networking system 160 is updating the first user'ssocial affinity with respect to the second user. In particularembodiments, if the proximity coefficient is only being used to selectand rank particular search results, then social-networking system 160may update proximity coefficients on an as-needed basis. As an exampleand not by way of limitation, in the situation above where user Alice issearching for John Doe, social-networking system 160 may update theproximity coefficient for Alice with respect to all users named JohnDoe, but may refrain from updating the proximity coefficients for allother users on social-networking system 160, until Alice makes a requestfor the other user which would require an updated proximity coefficient.

In particular embodiments, a proximity coefficient may be identical fora first user with respect to a second user, and the second user withrespect to the first user. If social-networking system 160 updates aproximity coefficient for the first user with respect to the seconduser, it may automatically update the proximity coefficient for thesecond user with respect to the first user. As an example and not by wayof limitation, in the situation above where Alice has only searched forJohn Doe, then social-networking system 160 would not update theproximity coefficient for Alice with respect to user Jane Doe. However,if Jane Doe later submits a search query for Alice, social-networkingsystem 160 may update the proximity coefficient for Jane Doe withrespect to Alice, and automatically update Alice's proximity coefficientwith respect to Jane Doe.

FIG. 14 illustrates an example method 1400 for determining a set ofsearch results and ranking the search results based on a locationhistory comparison. At step 1410, social-networking system 160 mayaccess a social graph of social-networking system 160. At step 1420,social-networking system 160 may receive a query from a user ofsocial-networking system 160. As an example and not by way oflimitation, the query may comprise a search request or graph query froma first user of social-networking system 160. At step 1430,social-networking system 160 may generate a set of one or more searchresults in response to the search query. At step 1440, social-networkingsystem 160 may determine if any of the search results have a proximitycoefficient for the first user with respect to the search result. As anexample and not by way of limitation, this may include the steps ofdetermining whether the first user's location history shows a closeproximity encounter between the first user and one or more locationsassociated with the particular search result, and calculating aproximity coefficient for any search results that have such a closeproximity encounter with the first user. At step 1450, the searchresults may be scored based at least part on whether a proximitycoefficient exists for a particular search result. Search results thatdo not have a proximity coefficient (i.e. because there was no closeproximity encounter between the first user's location history and one ormore locations associated with the search result) may be scored lowercompared to search results that have an associated proximity coefficientwith respect to the first user. At step 1460, social-networking system160 may send the set of search results to the first user as scored.

Particular embodiments may repeat one or more steps of the method ofFIG. 14, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 14 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 14 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.14, this disclosure contemplates any suitable combination of anysuitable components, devices, or systems carrying out any suitable stepsof the method of FIG. 14.

Content Promotion

In particular embodiments, social-networking system 160 may use thelocation history comparison and a proximity coefficient to determine oneor more content items to be presented to a user. As an example and notby way of limitation, social-networking system 160 may use locationhistory comparison and proximity coefficient to rank content items withsimilar social affinity scores for a particular user, and present thecontent item with a high proximity coefficient higher on a newsfeed ofthe particular user. As another example, social-networking system 160may use location history comparison and proximity coefficient to updatethe social affinity of the user with respect to the content item, andrank the content items based on their updated social affinity scores. Inparticular embodiments, social-networking system 160 may improve contentpresented in a newsfeed to a particular user by determining contentitems that have an associated location near where the particular userhas been, and ranking those content items more highly. As an example andnot by way of limitation, using proximity coefficients for content itemsmay promote “local” content to a particular user, such as posts orcomments by friends near the particular user, or content regardingevents happening nearby and which the particular user could attend.Content associated with a particular location may be an image or videocreated at the particular location, or tagged with the particularlocation when shared on social-networking system 160. Although thisdisclosure discusses determining and ranking content items forpresentation in a newsfeed of a social-networking system, thisdisclosure contemplates using location history comparison and proximitycoefficient in any suitable method for selecting and ranking one or morecontent items to users.

In particular embodiments, social-networking system 160 may determinelocations that are highly relevant to a particular user based on thelocation history of the particular user. As an example and not by way oflimitation, social-networking system 160 may access the location historyfor user Alice, and determine that she spends most of her time in theevenings and nights at location A, while she spends most of her time inthe day at location B, and frequently goes to location C around noon.Social-networking system 160 may infer based on this location historythat location A is Alice's home, location B is Alice's place of work,and location C is a restaurant that Alice frequently visits (and byadditional inference, a restaurant that Alice likes). Social-networkingsystem 160 may then compare locations A, B, and C with content shared byother users on social-networking system 160, determine if any contenthas an associated location at or near locations A, B, or C, then presentthose content items to Alice. In particular embodiments,social-networking system 160 may not use a pattern of location updatesfor Alice, and may instead update content to be presented to Alice basedon her most recent location updates. In particular embodiments,social-networking system 160 may calculate a content score for eachcontent item shared on social-networking system 160, wherein the contentscore for each viewing user comprises the social affinity of the contentitem to the viewing user (e.g. photos taken by a friend, photos taken byan acquaintance but depicting a friend, etc.), as well as the proximitycoefficient calculated for the viewing user with respect to the contentitem.

In particular embodiments, social-networking system 160 may determinethat a user is traveling, and adjust the calculation of content scoresuch that content associated with locations where the user is travelingis also ranked highly to the user. As an example and not by way oflimitation, user Carol may be a long-time resident of Palo Alto, Calif.,who works in Menlo Park, Calif. In ordinary use, social-networkingsystem 160 may rank highly content items which are associated witheither Palo Alto or Menlo Park. Carol may have a friend, Alice whoresides in New York City, N.Y. Because Alice lives far away, and anycontent item shared by her while she are in New York City are not closeto any point in the location history of Carol, Carol's newsfeed may rankcontent shared by Alice low within the newsfeed, or filter them out fromthe newsfeed altogether. However, if Carol visits New York City for aweek, then any content shared by Alice during that week and associatedwith New York City may become more relevant to Carol, and that contentmay be ranked more highly for Carol. The content shared during that weekmay be more highly ranked even when Carol returns to Palo Alto, andsubsequent content shared by Alice from New York City may be ranked morehighly based on an increased proximity coefficient for Carol withrespect to content shared from New York City. In particular embodiments,the proximity coefficient for the travel location may be restored whenthe user leaves. As an example and not by way of limitation, once Carolleaves New York City and returns to Palo Alto, any new content shared byAlice may be ranked lower in Carol's newsfeed in the same manner asbefore Carol went to New York City.

In particular embodiments, social-networking system 160 may reduce theranking of content items shared by a particular user when thatparticular user moves away from the viewing user. As an example and notby way of limitation, in the situation discussed above, Carol may have afriend Bob who also resides in Palo Alto, whose shared content is rankedhighly on Carol newsfeed by social-networking system 160. Bob may visitBoston, Mass. for two weeks, and share content from Boston.Social-networking system 160 may determine that the content shared byBob from Boston is not as relevant to Carol, since the locations of theshared content items are now very far from any locations stored inCarol's location history, and the proximity coefficient for Carol withrespect to the Boston content shared by Bob is very small. Therefore,Bob's shared content from Boston will be ranked lower in Carol'snewsfeed. In particular embodiments, when Bob returns to Palo Alto andshared content associated with Palo Alto, social-networking system 160may determine that the proximity coefficient for Carol with respect tothis new content is higher, and accordingly rank this content higher onCarol's newsfeed.

In particular embodiments, social-networking system 160 may use a changein proximity coefficient between a first user and a second user toadjust the ranking of content shared by the second user on a newsfeed ofthe first user. If the proximity coefficient for the first user withrespect to the second user was increased, social-networking system 160may increase the ranking of content shared by the second user. As anexample and not by way of limitation, in the situation above, Carol mayhave a direct connection with another user, David, who is a friend ofCarol on social-networking system 160 but does not have a high socialaffinity otherwise with respect to Carol, e.g. Carol and David do notcommunicate with each other frequently through social-networking system160, and are not tagged together in any content shared onsocial-networking system 160. Therefore, social-networking system 160may not rank content shared by David very highly on Carol's newsfeed.Then, based on a comparison of location history, social-networkingsystem 160 may determine that Carol and David were at the same event theprevious night, and were in close proximity of each other for severalhours. Social-networking system 160 may then increase the proximitycoefficient for Carol with respect to David. Social-networking system160 may also increase the ranking for content shared by David on Carol'snewsfeed, based on the increased proximity coefficient for David,regardless of any change in proximity coefficient for Carol with respectto the particular content shared by David. In particular embodiments, asthe proximity coefficient decays over time, the boost to the ranking forDavid's shared content may also be decayed, so that the boost in rankingis a temporary one. From Carol's point of view, after meeting with Davidin person, she may see an increase in content shared by David on hernewsfeed, and assuming she does nothing else to increase her socialaffinity with David, over the next several weeks content shared by Davidwould appear less frequently or less prominently on the newsfeed untilthe ranking was restored to the baseline ranking.

FIG. 15 illustrates an example method for determining a ranking ofcontent items to be presented to a particular user of social-networkingsystem 160. At step 1510, social-networking system 160 may access asocial graph 200 of social-networking system 160. At step 1520,social-networking system 160 may calculate one or more content scoreswherein each content score corresponds to a content item shared onsocial-networking system 160. In particular embodiments, the contentscore may comprise a proximity coefficient calculated between a locationhistory of a first user of social-networking system 160 and a locationassociated with the content item. In particular embodiments, thelocation associated with the content item may comprise a locationhistory of a second user, the second user being associated with thecontent item. At step 1530, social-networking system 160 may send one ormore content items to the first user, based at least in part on thecontent scores calculated for the respective content items.

Particular embodiments may repeat one or more steps of the method ofFIG. 15, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 15 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 15 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.15, this disclosure contemplates any suitable combination of anysuitable components, devices, or systems carrying out any suitable stepsof the method of FIG. 15.

Facial Recognition Suggestions Using Location Comparison

In particular embodiments, social-networking system 160 may usefacial-recognition processes to generate tag suggestions for images.Social-networking system 160 may compare image information, such as theportrayal of a person in an image, and compare that image informationwith a set of face signatures to try and predict whether the personportrayed in the image matches the face signature of any user ofsocial-networking system 160. These face signatures may be, for example,facial-representations generated by the social-networking system forparticular users of the online social network by analyzing other imageswhere those users are tagged. Thus, the standard tag-suggestionalgorithm may be of the form f(n,i), where n is the face signature of aparticular user of the online social network, and i is the imageinformation. However, sorting through the face signatures of thousands,or possibly millions, of users is not efficient and may lead to poorpredictions. The tag-suggestion algorithm may be improved by usingadditional information, such as social-graph information, typeaheadinformation, or other suitable information available on the onlinesocial network. In other words, the tag-suggestion algorithm may bemodified so the function is f(n,i,s), where s is the additionalinformation available on the online social network. In particularembodiments, the additional information may include, for example,social-graph affinity information, tag-history information, or userinputs (e.g., character strings inputted by a user in a typeaheadfield). A time-decay factor may also be applied to one or more of thefactors used in the tag-suggestion algorithm. For example, time-decaymay be considered with respect to tag-history information, such thatmore recent tags are given more weight in the tag-suggestion algorithm.The predictions may then be sent to a user as tag suggestions, which theuser may select in order to tag the image for a particular user. The tagsuggestions may be presented as the user enters characters into atag-label field, with the tag suggestions being refined in real-timeusing typeahead functionality as the user enters more characters intothe field. Further discussion of using social network information toimprove tag suggestions may be found in U.S. Patent ApplicationPublication No. 2013/0262588, filed May 30, 2013, which is incorporatedby reference herein.

In particular embodiments, social-networking system 160 may use thelocation history comparison and a proximity coefficient to improve tagsuggestions for images shared to social-networking system 160. In otherwords, the tag-suggestion algorithm may be modified so the function isf(n,i,s,l), where l is the location-history information accessed bysocial-networking system 160. In particular embodiments, the locationhistory comparison and proximity coefficient may be used bysocial-networking system 160 to reduce the number of facial recognitioncandidates to be analyzed by the algorithm, or may be used to improvethe scores of one or more candidates.

In particular embodiments, the tag-suggestion algorithm withoutaccessing location-history information may be able to narrow thepotential candidates to suggest to the user to two or three candidates,but social-networking system 160 may not be able to further disambiguatebetween the remaining candidates based on other social-networkinginformation. As an example and not by way of limitation, user Andy maycapture an image and share the image on social-networking system 160,wherein the image depicts both Andy and another user Betty. Betty mayhave an identical twin, Christy, and Betty and Christy have very similarsocial affinity with respect to Andy. When using the tag-suggestionalgorithm without a location-history information component,social-networking system 160 may be able to determine that the imagedepicts Andy and either Betty or Christy, but be unable to distinguishfurther between the two. In particular embodiments, social-networkingsystem 160 may then access the location-history information to furtherdistinguish between Betty and Christy. In particular embodiments,social-networking system 160 may access the location-history informationas a part of the tag-suggestion algorithm to determine during executionof the algorithm that Betty is depicted in the picture, not Christy.

In particular embodiments, social-networking system 160 may uselocation-history information to eliminate one or more candidates fromconsideration for the tag suggestion. In particular embodiments,social-networking system 160 may determine a location to be associatedwith the particular image. As an example and not by way of limitation,social-networking system 160 may determine an associated location basedon: location metadata within the image when the image is shared tosocial-networking system 160; by the location of the uploading user(e.g. Andy's location) when the image is shared to social-networkingsystem 160, if the time difference between the image creation and imagesharing is very small; the location history of another user taggedwithin the image (e.g. Andy's location history); or by check-in ortagging activities of users in relation to the image (e.g. Andy sharesthe photo as part of a check-in to a particular place, or posts theimage with the comment “at Dolores Park” and social-networking system160 may associate the photo with Dolores Park based on the tag). Iflocation metadata for the image is available, social-networking system160 may use the location metadata for comparison purposes even if theimage was created a considerable amount of time before it is shared. Asan example and not by way of limitation, even if Andy shares the imageto social-networking system 160 a month after taking the picture, thelocation metadata may be used to improve the tag-suggestion algorithm.If a threshold amount of time has passed between the creation of theimage and the upload to social-networking system 160, social-networkingsystem 160 may determine that the location of the uploading user is nota reliable location to be associated with the image. In this example,social-networking system 160 may use Andy's location history from whenthe image was taken to use for comparison purposes.

In particular embodiments, once an associated location for the image isdetermined, social-networking system 160 may compare the associatedlocation with the location history of the one or more candidates todetermine if there is a match in location and time with the image. Inthe example discussed above, if Andy shares the image a month after itis taken, social-networking system 160 may look at Betty and Christy'slocation updates from a month ago at the time the image was taken. If atthe time the image was taken, Christy was very far away from the photolocation, then social-networking system 160 may eliminate Christy as afacial recognition candidate. In particular embodiments, ifsocial-networking system 160 is able to determine that one candidate wasnear the location of the image and the other candidates were not,social-networking system 160 may determine that the nearby candidate isthe most likely candidate to suggest to a user. As an example and not byway of limitation, if, at the time the image was taken, Betty andChristy were both in San Francisco, Calif., but Betty was within 20yards of the image's location at the time while Christy was 500 yardsaway, social-networking system 160 may select Betty as the candidate fortag suggestions.

In particular embodiments, social-networking system 160 may use thelocation history of another user associated with the image to improvethe tag-suggestion algorithm. Social-networking system 160 may comparethe location history of a candidate with the location history of theuser sharing the image to social-networking system 160, or another userwho is depicted within the image. In the example discussed above, Andyis both the sharing user and the other user depicted within the image.Social-networking system 160 may therefore compare Andy's locationhistory with Betty's and Christy's location histories to determine whichof the two is likely the person depicted in the image.

In particular embodiments, a facial-recognition score calculated for afirst image of social-networking system 160 as an input for determininga facial-recognition score for a second image of social-networkingsystem 160. In particular embodiments, social-networking system 160 mayuse as an additional input a confirmation by one or more users ofsocial-networking system 160 of the tag suggestion. As an example andnot by way of limitation, if social-networking system 160 has determinedin the above example that Betty is the person depicted in the imageshared by Andy, social-networking system 160 may suggest tagging Bettyin the image, which Andy may accept. If Andy subsequently shares asecond image depicting himself and another person who could be eitherBetty or Christy, and social-networking system 160 determines that thesecond image has location and time metadata that is very similar to thefirst image, social-networking system 160 may determine that Betty isdepicted in the second image as well, without calculating a newfacial-recognition score based on a location history comparison forBetty and Christy against a location of the second image.

FIG. 16 illustrates an example method for determining a ranking ofcontent items to be presented to a particular user of social-networkingsystem 160. At step 1610, social-networking system 160 may access animage associated with social-networking system 160, wherein the imagedepicts at least one person. At step 1620, social-networking system 160may determine one or more facial-recognition scores, wherein eachfacial-recognition score corresponds to a user of a first set of usersfor a tag suggestion. In particular embodiments, the facial-recognitionscore may comprise an affinity coefficient calculated for a particularuser with respect to the image based on a social affinity of the userwith respect to one or more nodes of the social graph associated withthe image. At step 1630, social-networking system 160 may adjust thefacial-recognition scores based at least in part on a comparison of thelocation history of the user with a location associated with the image.As an example and not by way of limitation, social-networking system 160may compare the location history of a user of the first set of usersagainst a location where the image was created, or a location history ofanother user associated with the image. In particular embodiments,social-networking system 160 may adjust a facial-recognition score for auser having no common location history with the location associated withthe image by adjusting the facial-recognition score to zero, effectivelyeliminating the user from the tag suggestion. In particular embodiments,social-networking system 160 may adjust a particular facial-recognitionscore upwards based on a close proximity encounter between the locationhistory of the particular user associated with the particularfacial-recognition score, and the location associated with the image. Atstep 1640, social-networking system 160 may generate one or more tagsuggestions for the person depicted in the image, and present the tagsuggestions to one or more users.

Particular embodiments may repeat one or more steps of the method ofFIG. 16, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 16 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 16 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.16, this disclosure contemplates any suitable combination of anysuitable components, devices, or systems carrying out any suitable stepsof the method of FIG. 16.

Social Graph Affinity and Coefficient

In particular embodiments, social-networking system 160 may determinethe social-graph affinity (which may be referred to herein as“affinity”) of various social-graph entities for each other. Affinitymay represent the strength of a relationship or level of interestbetween particular objects associated with the online social network,such as users, concepts, content, actions, advertisements, other objectsassociated with the online social network, or any suitable combinationthereof. Affinity may also be determined with respect to objectsassociated with third-party systems 170 or other suitable systems. Anoverall affinity for a social-graph entity for each user, subjectmatter, or type of content may be established. The overall affinity maychange based on continued monitoring of the actions or relationshipsassociated with the social-graph entity. Although this disclosuredescribes determining particular affinities in a particular manner, thisdisclosure contemplates determining any suitable affinities in anysuitable manner.

In particular embodiments, social-networking system 160 may measure orquantify social-graph affinity using an affinity coefficient (which maybe referred to herein as “coefficient”). The coefficient may representor quantify the strength of a relationship between particular objectsassociated with the online social network. The coefficient may alsorepresent a probability or function that measures a predictedprobability that a user will perform a particular action based on theuser's interest in the action. In this way, a user's future actions maybe predicted based on the user's prior actions, where the coefficientmay be calculated at least in part a the history of the user's actions.Coefficients may be used to predict any number of actions, which may bewithin or outside of the online social network. As an example and not byway of limitation, these actions may include various types ofcommunications, such as sending messages, posting content, or commentingon content; various types of observation actions, such as accessing orviewing profile pages, media, or other suitable content; various typesof coincidence information about two or more social-graph entities, suchas being in the same group, tagged in the same photograph, checked-in atthe same location, or attending the same event; or other suitableactions. Although this disclosure describes measuring affinity in aparticular manner, this disclosure contemplates measuring affinity inany suitable manner.

In particular embodiments, social-networking system 160 may use avariety of factors to calculate a coefficient. These factors mayinclude, for example, user actions, types of relationships betweenobjects, location information, other suitable factors, or anycombination thereof. In particular embodiments, different factors may beweighted differently when calculating the coefficient. The weights foreach factor may be static or the weights may change according to, forexample, the user, the type of relationship, the type of action, theuser's location, and so forth. Ratings for the factors may be combinedaccording to their weights to determine an overall coefficient for theuser. As an example and not by way of limitation, particular useractions may be assigned both a rating and a weight while a relationshipassociated with the particular user action is assigned a rating and acorrelating weight (e.g., so the weights total 100%). To calculate thecoefficient of a user towards a particular object, the rating assignedto the user's actions may comprise, for example, 60% of the overallcoefficient, while the relationship between the user and the object maycomprise 40% of the overall coefficient. In particular embodiments, thesocial-networking system 160 may consider a variety of variables whendetermining weights for various factors used to calculate a coefficient,such as, for example, the time since information was accessed, decayfactors, frequency of access, relationship to information orrelationship to the object about which information was accessed,relationship to social-graph entities connected to the object, short- orlong-term averages of user actions, user feedback, other suitablevariables, or any combination thereof. As an example and not by way oflimitation, a coefficient may include a decay factor that causes thestrength of the signal provided by particular actions to decay withtime, such that more recent actions are more relevant when calculatingthe coefficient. The ratings and weights may be continuously updatedbased on continued tracking of the actions upon which the coefficient isbased. Any type of process or algorithm may be employed for assigning,combining, averaging, and so forth the ratings for each factor and theweights assigned to the factors. In particular embodiments,social-networking system 160 may determine coefficients usingmachine-learning algorithms trained on historical actions and past userresponses, or data farmed from users by exposing them to various optionsand measuring responses. Although this disclosure describes calculatingcoefficients in a particular manner, this disclosure contemplatescalculating coefficients in any suitable manner.

In particular embodiments, social-networking system 160 may calculate acoefficient based on a user's actions. Social-networking system 160 maymonitor such actions on the online social network, on a third-partysystem 170, on other suitable systems, or any combination thereof. Anysuitable type of user actions may be tracked or monitored. Typical useractions include viewing profile pages, creating or posting content,interacting with content, joining groups, listing and confirmingattendance at events, checking-in at locations, liking particular pages,creating pages, and performing other tasks that facilitate socialaction. In particular embodiments, social-networking system 160 maycalculate a coefficient based on the user's actions with particulartypes of content. The content may be associated with the online socialnetwork, a third-party system 170, or another suitable system. Thecontent may include users, profile pages, posts, news stories,headlines, instant messages, chat room conversations, emails,advertisements, pictures, video, music, other suitable objects, or anycombination thereof. Social-networking system 160 may analyze a user'sactions to determine whether one or more of the actions indicate anaffinity for subject matter, content, other users, and so forth. As anexample and not by way of limitation, if a user may make frequentlyposts content related to “coffee” or variants thereof, social-networkingsystem 160 may determine the user has a high coefficient with respect tothe concept “coffee”. Particular actions or types of actions may beassigned a higher weight and/or rating than other actions, which mayaffect the overall calculated coefficient. As an example and not by wayof limitation, if a first user emails a second user, the weight or therating for the action may be higher than if the first user simply viewsthe user-profile page for the second user.

In particular embodiments, social-networking system 160 may calculate acoefficient based on the type of relationship between particularobjects. Referencing the social graph 200, social-networking system 160may analyze the number and/or type of edges 206 connecting particularuser nodes 202 and concept nodes 204 when calculating a coefficient. Asan example and not by way of limitation, user nodes 202 that areconnected by a spouse-type edge (representing that the two users aremarried) may be assigned a higher coefficient than a user nodes 202 thatare connected by a friend-type edge. In other words, depending upon theweights assigned to the actions and relationships for the particularuser, the overall affinity may be determined to be higher for contentabout the user's spouse than for content about the user's friend. Inparticular embodiments, the relationships a user has with another objectmay affect the weights and/or the ratings of the user's actions withrespect to calculating the coefficient for that object. As an exampleand not by way of limitation, if a user is tagged in first photo, butmerely likes a second photo, social-networking system 160 may determinethat the user has a higher coefficient with respect to the first photothan the second photo because having a tagged-in-type relationship withcontent may be assigned a higher weight and/or rating than having alike-type relationship with content. In particular embodiments,social-networking system 160 may calculate a coefficient for a firstuser based on the relationship one or more second users have with aparticular object. In other words, the connections and coefficientsother users have with an object may affect the first user's coefficientfor the object. As an example and not by way of limitation, if a firstuser is connected to or has a high coefficient for one or more secondusers, and those second users are connected to or have a highcoefficient for a particular object, social-networking system 160 maydetermine that the first user should also have a relatively highcoefficient for the particular object. In particular embodiments, thecoefficient may be based on the degree of separation between particularobjects. The lower coefficient may represent the decreasing likelihoodthat the first user will share an interest in content objects of theuser that is indirectly connected to the first user in the social graph200. As an example and not by way of limitation, social-graph entitiesthat are closer in the social graph 200 (i.e., fewer degrees ofseparation) may have a higher coefficient than entities that are furtherapart in the social graph 200.

In particular embodiments, social-networking system 160 may calculate acoefficient based on location information. Objects that aregeographically closer to each other may be considered to be more relatedor of more interest to each other than more distant objects. Inparticular embodiments, the coefficient of a user towards a particularobject may be based on the proximity of the object's location to acurrent location associated with the user (or the location of a clientsystem 130 of the user). A first user may be more interested in otherusers or concepts that are closer to the first user. As an example andnot by way of limitation, if a user is one mile from an airport and twomiles from a gas station, social-networking system 160 may determinethat the user has a higher coefficient for the airport than the gasstation based on the proximity of the airport to the user.

In particular embodiments, social-networking system 160 may performparticular actions with respect to a user based on coefficientinformation. Coefficients may be used to predict whether a user willperform a particular action based on the user's interest in the action.A coefficient may be used when generating or presenting any type ofobjects to a user, such as advertisements, search results, news stories,media, messages, notifications, or other suitable objects. Thecoefficient may also be utilized to rank and order such objects, asappropriate. In this way, social-networking system 160 may provideinformation that is relevant to user's interests and currentcircumstances, increasing the likelihood that they will find suchinformation of interest. In particular embodiments, social-networkingsystem 160 may generate content based on coefficient information.Content objects may be provided or selected based on coefficientsspecific to a user. As an example and not by way of limitation, thecoefficient may be used to generate media for the user, where the usermay be presented with media for which the user has a high overallcoefficient with respect to the media object. As another example and notby way of limitation, the coefficient may be used to generateadvertisements for the user, where the user may be presented withadvertisements for which the user has a high overall coefficient withrespect to the advertised object. In particular embodiments,social-networking system 160 may generate search results based oncoefficient information. Search results for a particular user may bescored or ranked based on the coefficient associated with the searchresults with respect to the querying user. As an example and not by wayof limitation, search results corresponding to objects with highercoefficients may be ranked higher on a search-results page than resultscorresponding to objects having lower coefficients.

In particular embodiments, social-networking system 160 may calculate acoefficient in response to a request for a coefficient from a particularsystem or process. To predict the likely actions a user may take (or maybe the subject of) in a given situation, any process may request acalculated coefficient for a user. The request may also include a set ofweights to use for various factors used to calculate the coefficient.This request may come from a process running on the online socialnetwork, from a third-party system 170 (e.g., via an API or othercommunication channel), or from another suitable system. In response tothe request, social-networking system 160 may calculate the coefficient(or access the coefficient information if it has previously beencalculated and stored). In particular embodiments, social-networkingsystem 160 may measure an affinity with respect to a particular process.Different processes (both internal and external to the online socialnetwork) may request a coefficient for a particular object or set ofobjects. Social-networking system 160 may provide a measure of affinitythat is relevant to the particular process that requested the measure ofaffinity. In this way, each process receives a measure of affinity thatis tailored for the different context in which the process will use themeasure of affinity.

In connection with social-graph affinity and affinity coefficients,particular embodiments may utilize one or more systems, components,elements, functions, methods, operations, or steps disclosed in U.S.patent application Ser. No. 11/503,093, filed 11 Aug. 2006, U.S. patentapplication Ser. No. 12/977,027, filed 22 Dec. 2010, U.S. patentapplication Ser. No. 12/978,265, filed 23 Dec. 2010, and U.S. patentapplication Ser. No. 13/632,869, filed 1 Oct. 2012, each of which isincorporated by reference.

Privacy

In particular embodiments, one or more of the content objects of theonline social network may be associated with a privacy setting. Theprivacy settings (or “access settings”) for an object may be stored inany suitable manner, such as, for example, in association with theobject, in an index on an authorization server, in another suitablemanner, or any combination thereof. A privacy setting of an object mayspecify how the object (or particular information associated with anobject) can be accessed (e.g., viewed or shared) using the online socialnetwork. Where the privacy settings for an object allow a particularuser to access that object, the object may be described as being“visible” with respect to that user. As an example and not by way oflimitation, a user of the online social network may specify privacysettings for a user-profile page identify a set of users that may accessthe work experience information on the user-profile page, thus excludingother users from accessing the information. In particular embodiments,the privacy settings may specify a “blocked list” of users that shouldnot be allowed to access certain information associated with the object.In other words, the blocked list may specify one or more users orentities for which an object is not visible. As an example and not byway of limitation, a user may specify a set of users that may not accessphotos albums associated with the user, thus excluding those users fromaccessing the photo albums (while also possibly allowing certain usersnot within the set of users to access the photo albums). In particularembodiments, privacy settings may be associated with particularsocial-graph elements. Privacy settings of a social-graph element, suchas a node or an edge, may specify how the social-graph element,information associated with the social-graph element, or content objectsassociated with the social-graph element can be accessed using theonline social network. As an example and not by way of limitation, aparticular concept node 204 corresponding to a particular photo may havea privacy setting specifying that the photo may only be accessed byusers tagged in the photo and their friends. In particular embodiments,privacy settings may allow users to opt in or opt out of having theiractions logged by social-networking system 160 or shared with othersystems (e.g., third-party system 170). In particular embodiments, theprivacy settings associated with an object may specify any suitablegranularity of permitted access or denial of access. As an example andnot by way of limitation, access or denial of access may be specifiedfor particular users (e.g., only me, my roommates, and my boss), userswithin a particular degrees-of-separation (e.g., friends, orfriends-of-friends), user groups (e.g., the gaming club, my family),user networks (e.g., employees of particular employers, students oralumni of particular university), all users (“public”), no users(“private”), users of third-party systems 170, particular applications(e.g., third-party applications, external websites), other suitableusers or entities, or any combination thereof. Although this disclosuredescribes using particular privacy settings in a particular manner, thisdisclosure contemplates using any suitable privacy settings in anysuitable manner.

In particular embodiments, one or more servers 162 may beauthorization/privacy servers for enforcing privacy settings. Inresponse to a request from a user (or other entity) for a particularobject stored in a data store 164, social-networking system 160 may senda request to the data store 164 for the object. The request may identifythe user associated with the request and may only be sent to the user(or a client system 130 of the user) if the authorization serverdetermines that the user is authorized to access the object based on theprivacy settings associated with the object. If the requesting user isnot authorized to access the object, the authorization server mayprevent the requested object from being retrieved from the data store164, or may prevent the requested object from be sent to the user. Inthe search query context, an object may only be generated as a searchresult if the querying user is authorized to access the object. In otherwords, the object must have a visibility that is visible to the queryinguser. If the object has a visibility that is not visible to the user,the object may be excluded from the search results. Although thisdisclosure describes enforcing privacy settings in a particular manner,this disclosure contemplates enforcing privacy settings in any suitablemanner.

Systems and Methods

FIG. 17 illustrates an example computer system 1700. In particularembodiments, one or more computer systems 1700 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 1700 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 1700 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 1700.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems1700. This disclosure contemplates computer system 1700 taking anysuitable physical form. As example and not by way of limitation,computer system 1700 may be an embedded computer system, asystem-on-chip (SOC), a single-board computer system (SBC) (such as, forexample, a computer-on-module (COM) or system-on-module (SOM)), adesktop computer system, a laptop or notebook computer system, aninteractive kiosk, a mainframe, a mesh of computer systems, a mobiletelephone, a personal digital assistant (PDA), a server, a tabletcomputer system, or a combination of two or more of these. Whereappropriate, computer system 1700 may include one or more computersystems 1700; be unitary or distributed; span multiple locations; spanmultiple machines; span multiple data centers; or reside in a cloud,which may include one or more cloud components in one or more networks.Where appropriate, one or more computer systems 1700 may perform withoutsubstantial spatial or temporal limitation one or more steps of one ormore methods described or illustrated herein. As an example and not byway of limitation, one or more computer systems 1700 may perform in realtime or in batch mode one or more steps of one or more methods describedor illustrated herein. One or more computer systems 1700 may perform atdifferent times or at different locations one or more steps of one ormore methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 1700 includes a processor1702, memory 1704, storage 1706, an input/output (I/O) interface 1708, acommunication interface 1710, and a bus 1712. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 1702 includes hardware forexecuting instructions, such as those making up a computer program. Asan example and not by way of limitation, to execute instructions,processor 1702 may retrieve (or fetch) the instructions from an internalregister, an internal cache, memory 1704, or storage 1706; decode andexecute them; and then write one or more results to an internalregister, an internal cache, memory 1704, or storage 1706. In particularembodiments, processor 1702 may include one or more internal caches fordata, instructions, or addresses. This disclosure contemplates processor1702 including any suitable number of any suitable internal caches,where appropriate. As an example and not by way of limitation, processor1702 may include one or more instruction caches, one or more datacaches, and one or more translation lookaside buffers (TLBs).Instructions in the instruction caches may be copies of instructions inmemory 1704 or storage 1706, and the instruction caches may speed upretrieval of those instructions by processor 1702. Data in the datacaches may be copies of data in memory 1704 or storage 1706 forinstructions executing at processor 1702 to operate on; the results ofprevious instructions executed at processor 1702 for access bysubsequent instructions executing at processor 1702 or for writing tomemory 1704 or storage 1706; or other suitable data. The data caches mayspeed up read or write operations by processor 1702. The TLBs may speedup virtual-address translation for processor 1702. In particularembodiments, processor 1702 may include one or more internal registersfor data, instructions, or addresses. This disclosure contemplatesprocessor 1702 including any suitable number of any suitable internalregisters, where appropriate. Where appropriate, processor 1702 mayinclude one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 1702. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 1704 includes main memory for storinginstructions for processor 1702 to execute or data for processor 1702 tooperate on. As an example and not by way of limitation, computer system1700 may load instructions from storage 1706 or another source (such as,for example, another computer system 1700) to memory 1704. Processor1702 may then load the instructions from memory 1704 to an internalregister or internal cache. To execute the instructions, processor 1702may retrieve the instructions from the internal register or internalcache and decode them. During or after execution of the instructions,processor 1702 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor1702 may then write one or more of those results to memory 1704. Inparticular embodiments, processor 1702 executes only instructions in oneor more internal registers or internal caches or in memory 1704 (asopposed to storage 1706 or elsewhere) and operates only on data in oneor more internal registers or internal caches or in memory 1704 (asopposed to storage 1706 or elsewhere). One or more memory buses (whichmay each include an address bus and a data bus) may couple processor1702 to memory 1704. Bus 1712 may include one or more memory buses, asdescribed below. In particular embodiments, one or more memorymanagement units (MMUs) reside between processor 1702 and memory 1704and facilitate accesses to memory 1704 requested by processor 1702. Inparticular embodiments, memory 1704 includes random access memory (RAM).This RAM may be volatile memory, where appropriate Where appropriate,this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 1704 may include one ormore memories 1704, where appropriate. Although this disclosuredescribes and illustrates particular memory, this disclosurecontemplates any suitable memory.

In particular embodiments, storage 1706 includes mass storage for dataor instructions. As an example and not by way of limitation, storage1706 may include a hard disk drive (HDD), a floppy disk drive, flashmemory, an optical disc, a magneto-optical disc, magnetic tape, or aUniversal Serial Bus (USB) drive or a combination of two or more ofthese. Storage 1706 may include removable or non-removable (or fixed)media, where appropriate. Storage 1706 may be internal or external tocomputer system 1700, where appropriate. In particular embodiments,storage 1706 is non-volatile, solid-state memory. In particularembodiments, storage 1706 includes read-only memory (ROM). Whereappropriate, this ROM may be mask-programmed ROM, programmable ROM(PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM),electrically alterable ROM (EAROM), or flash memory or a combination oftwo or more of these. This disclosure contemplates mass storage 1706taking any suitable physical form. Storage 1706 may include one or morestorage control units facilitating communication between processor 1702and storage 1706, where appropriate. Where appropriate, storage 1706 mayinclude one or more storages 1706. Although this disclosure describesand illustrates particular storage, this disclosure contemplates anysuitable storage.

In particular embodiments, I/O interface 1708 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 1700 and one or more I/O devices. Computersystem 1700 may include one or more of these I/O devices, whereappropriate. One or more of these I/O devices may enable communicationbetween a person and computer system 1700. As an example and not by wayof limitation, an I/O device may include a keyboard, keypad, microphone,monitor, mouse, printer, scanner, speaker, still camera, stylus, tablet,touch screen, trackball, video camera, another suitable I/O device or acombination of two or more of these. An I/O device may include one ormore sensors. This disclosure contemplates any suitable I/O devices andany suitable I/O interfaces 1708 for them. Where appropriate, I/Ointerface 1708 may include one or more device or software driversenabling processor 1702 to drive one or more of these I/O devices. I/Ointerface 1708 may include one or more I/O interfaces 1708, whereappropriate. Although this disclosure describes and illustrates aparticular I/O interface, this disclosure contemplates any suitable I/Ointerface.

In particular embodiments, communication interface 1710 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 1700 and one or more other computer systems 1700 or oneor more networks. As an example and not by way of limitation,communication interface 1710 may include a network interface controller(NIC) or network adapter for communicating with an Ethernet or otherwire-based network or a wireless NIC (WNIC) or wireless adapter forcommunicating with a wireless network, such as a WI-FI network. Thisdisclosure contemplates any suitable network and any suitablecommunication interface 1710 for it. As an example and not by way oflimitation, computer system 1700 may communicate with an ad hoc network,a personal area network (PAN), a local area network (LAN), a wide areanetwork (WAN), a metropolitan area network (MAN), or one or moreportions of the Internet or a combination of two or more of these. Oneor more portions of one or more of these networks may be wired orwireless. As an example, computer system 1700 may communicate with awireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FInetwork, a WI-MAX network, a cellular telephone network (such as, forexample, a Global System for Mobile Communications (GSM) network), orother suitable wireless network or a combination of two or more ofthese. Computer system 1700 may include any suitable communicationinterface 1710 for any of these networks, where appropriate.Communication interface 1710 may include one or more communicationinterfaces 1710, where appropriate. Although this disclosure describesand illustrates a particular communication interface, this disclosurecontemplates any suitable communication interface.

In particular embodiments, bus 1712 includes hardware, software, or bothcoupling components of computer system 1700 to each other. As an exampleand not by way of limitation, bus 1712 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 1712may include one or more buses 1712, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Miscellaneous

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,functions, operations, or steps, any of these embodiments may includeany combination or permutation of any of the components, elements,functions, operations, or steps described or illustrated anywhere hereinthat a person having ordinary skill in the art would comprehend.Furthermore, reference in the appended claims to an apparatus or systemor a component of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A method comprising, by a mobile-client system:receiving user input from a first user to send a message to a pluralityof second users, the input comprising an indication of the first usercurrently being located at a first geographic location, a time periodfor which the first geographic location of the first user is visible tothe plurality of second users, and one or more content items shared bythe first user, wherein at least one of the content items is associatedwith the first geographic location at which the first user is currentlylocated; sending the message to one or more second users selected fromthe plurality of second users, wherein the message sent to a particularsecond user comprises instructions to display, on a second mobile-clientsystem of the particular second user, an interface comprising (1) ageographic map indicating the first geographic location of the firstuser that sent the message and a second geographic location of theparticular second user to whom the message was sent and (2) an estimateddistance value indicating a distance between the first geographiclocation of the first user that sent the message and the secondgeographic location of the particular second user to whom the messagewas sent, wherein the estimated distance value is displayed along with atime stamp indicating a time of last location update of the first userthat sent the message, (3) a first interactive element that enables thesecond user to whom the message was sent to share an indication of thesecond geographic location with the first user, and 4) a secondinteractive element that enables the second user to send a secondmessage to the first user in response to the first message indicatingthe first geographic location shared by the first user; and receiving anotification referencing one or more of the selected second users towhom the message was sent, wherein the notification comprises anindication of one or more second geographic locations shared by the oneor more of the selected second users in response to the first messageindicating the first geographic location shared by the first user. 2.The method of claim 1, further comprising selecting one or more of thesecond users from the plurality of second users based on one or morenotification rules, wherein at least one of the notification rulesrequires the selected second users to be located within a thresholddistance of the first geographic location of the first user.
 3. Themethod of claim 1, further comprising selecting the particular seconduser from the plurality of second users based on the secondmobile-client system of the particular second user having the secondgeographic location within a threshold distance of the first geographiclocation.
 4. The method of claim 3, wherein the threshold distance isautomatically adjusted from a default first distance to a seconddistance based on information associated with the particular second userwith respect to the first user.
 5. The method of claim 1, wherein themessage further comprises instructions to display one or moreinteractive elements to the particular second user.
 6. The method ofclaim 5, wherein the one or more interactive elements comprise the firstinteractive element and the second interactive element.
 7. The method ofclaim 1, wherein the input further comprises a selection by the firstuser of the plurality of second users.
 8. The method of claim 1, whereinthe time of last location update of the first user is a time at whichthe first user was at the first geographic location.
 9. The method ofclaim 1, wherein the first geographic location is updated based on amovement of the first user.
 10. The method of claim 1, wherein themessage is sent as one or more of a SMS message, a MMS message, an emailmessage, a banner notification, a pop-up notification, an in-appnotification, a cloud-to-device notification, or any combinationthereof.
 11. The method of claim 1, wherein the message is sent within agroup message to other users of an online social network participatingin the group message.
 12. The method of claim 1, wherein the firstgeographic location is based on one or more of a global position system(GPS) signal, a Wi-Fi signal, or a cellular radio signal.
 13. The methodof claim 1, wherein the notification comprises an interactive elementfor the first user to send an indication of the first geographiclocation to the one or more of the selected second users referenced inthe notification.
 14. The method of claim 1, wherein the notificationcomprises a map view of the one or more second geographic locations ofthe one or more second users.
 15. The method of claim 1, furthercomprising sending a request in response to the notification for updatedsecond geographic locations of the one or more of the selected secondusers referenced in the notification.
 16. The method of claim 1, whereinthe notification comprises an interactive element for the first user todelete the notification.
 17. The method of claim 1, wherein thenotification comprises an interactive element for the first user to senda communication to the one or more of the selected second users.
 18. Themethod of claim 1, wherein: the first user corresponds to a first nodeof a social graph of the online social network, the social graphcomprising a plurality of nodes and a plurality of edges connecting thenodes, each of the edges between two of the nodes representing a singledegree of separation between them; and each selected second usercorresponds to a second node within a threshold degree of separation ofthe first node.
 19. The method of claim 1, wherein the one or morecontent items shared by the first user comprise a text, a photo, avideo, an audio recording, a status update, or a message.
 20. One ormore computer-readable non-transitory storage media embodying softwarethat is operable when executed to: receive user input from a first userto send a message to a plurality of second users, the input comprisingan indication of the first user currently being located at a firstgeographic location, a time period for which the first geographiclocation of the first user is visible to the plurality of second users,and one or more content items shared by the first user, wherein at leastone of the content items is associated with the first geographiclocation at which the first user is currently located; send the messageto one or more second users selected from the plurality of second users,wherein the message sent to a particular second user comprisesinstructions to display, on a second mobile-client system of theparticular second user, an interface comprising (1) a geographic mapindicating the first geographic location of the first user that sent themessage and a second geographic location of the particular second userto whom the message was sent and (2) an estimated distance valueindicating a distance between the first geographic location of the firstuser that sent the message and the second geographic location of theparticular second user to whom the message was sent, wherein theestimated distance value is displayed along with a time stamp indicatinga time of last location update of the first user that sent the message,(3) a first interactive element that enables the second user to whom themessage was sent to share an indication of the second geographiclocation with the first user, and 4) a second interactive element thatenables the second user to send a second message to the first user inresponse to the first message indicating the first geographic locationshared by the first user; and receive a notification referencing one ormore of the selected second users to whom the message was sent, whereinthe notification comprises an indication of one or more secondgeographic locations shared by the one or more of the selected secondusers in response to the first message indicating the first geographiclocation shared by the first user.
 21. A system comprising: one or moreprocessors; and a memory coupled to the processors comprisinginstructions executable by the processors, the processors operable whenexecuting the instructions to: receive user input from a first user tosend a message to a plurality of second users, the input comprising anindication of the first user currently being located at a firstgeographic location, a time period for which the first geographiclocation of the first user is visible to the plurality of second users,and one or more content items shared by the first user, wherein at leastone of the content items is associated with the first geographiclocation at which the first user is currently located; send the messageto one or more second users selected from the plurality of second users,wherein the message sent to a particular second user comprisesinstructions to display, on a second mobile-client system of theparticular second user, an interface comprising (1) a geographic mapindicating the first geographic location of the first user that sent themessage and a second geographic location of the particular second userto whom the message was sent and (2) an estimated distance valueindicating a distance between the first geographic location of the firstuser that sent the message and the second geographic location of theparticular second user to whom the message was sent, wherein theestimated distance value is displayed along with a time stamp indicatinga time of last location update of the first user that sent the message,(3) a first interactive element that enables the second user to whom themessage was sent to share an indication of the second geographiclocation with the first user, and 4) a second interactive element thatenables the second user to send a second message to the first user inresponse to the first message indicating the first geographic locationshared by the first user; and receive a notification referencing one ormore of the selected second users to whom the message was sent, whereinthe notification comprises an indication of one or more secondgeographic locations shared by the one or more of the selected secondusers in response to the first message indicating the first geographiclocation shared by the first user.